[PATCH] user32: Allow WM_CAPTURECHANGE indicating SetCapture() parameter.

Ken Thomases ken at codeweavers.com
Wed Jan 13 11:43:34 CST 2016


On Jan 12, 2016, at 10:27 PM, Christopher Thielen <cthielen at gmail.com> wrote:
> 
> Attached is my analysis of Wine's usage of WM_CAPTURECHANGED as requested by Alexandre.
> 
> Reading the code has revealed the same logic change I originally proposed -- allowing a WM_CAPTURECHANGED message to be sent to a window losing focus if it was also the window gaining focus -- is needed in the Mac driver as well. The Mac driver logic looks copied out of dlls/user32/input.c.

> dlls/winemac.drv/window.c:            SendMessageW(previous, WM_CAPTURECHANGED, 0, (LPARAM)hwnd);
> 
> Appears to be in need of the same patch as I'm suggesting. Any idea why this code appears duplicated? Something about OS X having a different window server than *nix?

The duplication is to enforce Mac-appropriate window moving behaviors, like preventing the user from dragging a window's title bar behind the Mac menu bar.

I don't think your change is needed here, although I also don't think it would hurt anything.  The code in the Mac driver is only called during a window move.  It is not used when a program calls SetCapture(), which I understand is the case you're interested in.

-Ken




More information about the wine-devel mailing list