[Bug 38275] New: DeferWindowPos accept NULL HWND and fail at EndDeferWindowPos()

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 23 19:48:43 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38275

            Bug ID: 38275
           Summary: DeferWindowPos accept NULL HWND and fail at
                    EndDeferWindowPos()
           Product: Wine
           Version: unspecified
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: user32
          Assignee: wine-bugs at winehq.org
          Reporter: rozhuk.im at gmail.com
      Distribution: ---

http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733da761ba6:/dlls/user/winpos.c

DeferWindowPos( HDWP hdwp, HWND hwnd...

does not check: hwnd != NULL (windows does!)
and later EndDeferWindowPos() fail in 

http://source.winehq.org/git/wine.git/blob/e882cdf55cc004b5ffb7b85d912b4733da761ba6:/dlls/winex11.drv/winpos.c
X11DRV_SetWindowPos(...)
...
 763     /* Fix redundant flags */
 764     if (!fixup_flags( winpos )) return FALSE;


fixup_flags()
...
WND *wndPtr = WIN_GetPtr( winpos->hwnd );
 382     BOOL ret = TRUE;
 383 
 384     if (!wndPtr || wndPtr == WND_OTHER_PROCESS)
 385     {
 386         SetLastError( ERROR_INVALID_WINDOW_HANDLE );
 387         return FALSE;
 388     }


Miranda NG was affected.

Workaround:
if (NULL != hwnd) /* Wine fix. */
    hdwp = DeferWindowPos(hdwp, hwnd...);

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list