Sweden-Number/dlls/winex11.drv
Rémi Bernon 92177b0b16 winex11.drv: Retry last ClipCursor when grab is released.
As we ignore these NotifyGrab / NotifyUngrab w.r.t focus decisions,
some applications are unaware of mouse grabs being lost and sometimes
cursor clipping is lost. We have to keep the last clip rectangle and
restore it when grab is released.

This has been squashed with the foreground window check from
Zhiyi Zhang <zzhang@codeweavers.com> to fix an issue that happens when
switching from a fullscreen window - because there's some additional
focus events involved - but in general, if the window that is getting
focus cannot be activated:

When FocusIn/NotifyWhileGrabbed is received, SetForegroundWindow is not
called if the window cannot be activated. When the FocusIn/NotifyUngrab
event arrives for the same window, we have to check the foreground
window before restoring cursor clipping rectangle.

For reference, the event sequence when pressing Alt-Tab - for WMs that
grab the keyboard - is the following:

1. FocusOut/NotifyGrab, when WM grabs the keyboard.
2. FocusOut/NotifyWhileGrabbed, while WM switches windows, this calls
   SetForegroundWindow(GetDesktopWindow()).

The event sequence for normal windows ends here, but for fullscreen
windows, there may be these additional events:

3. FocusIn/NotifyWhileGrabbed, which may not change Wine foreground
   window if it cannot be activated.
4. FocusIn/NotifyUnGrab, when WM releases the keyboard while switching
   windows, this is ignored but it should not retry to grab the cursor,
   because window is not foreground.
5. FocusOut/NotifyNormal, when WM finishes switching the windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:03:59 +02:00
..
Makefile.in winex11.drv: Initialize GPU registry data. 2019-06-13 08:16:33 +02:00
bitblt.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
brush.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
clipboard.c
desktop.c winex11.drv: Use generic EnumDisplayMonitors. 2019-06-25 13:22:17 +02:00
display.c winex11.drv: Make screen helpers independent of Xinerama. 2019-08-21 14:18:49 +02:00
event.c winex11.drv: Retry last ClipCursor when grab is released. 2019-09-06 19:03:59 +02:00
graphics.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
ime.c
init.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
keyboard.c winex11: Update the state of all keys on KeymapNotify. 2019-06-18 23:51:52 +02:00
mouse.c winex11.drv: Retry last ClipCursor when grab is released. 2019-09-06 19:03:59 +02:00
mwm.h
opengl.c winex11: Only handle errors from GLX requests in GLXErrorHandler(). 2019-05-06 13:19:33 -05:00
palette.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
pen.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
settings.c
systray.c
version.rc
vulkan.c
window.c explorer: Move screen saver activation to the X11 driver. 2019-05-03 16:30:39 +02:00
winex11.drv.spec winex11.drv: Use generic GetMonitorInfo. 2019-06-25 13:22:17 +02:00
wintab.c winex11/wintab: Set all Device Orientation values. 2019-04-23 23:50:44 +02:00
x11drv.h winex11.drv: Retry last ClipCursor when grab is released. 2019-09-06 19:03:59 +02:00
x11drv_main.c winex11.drv: Handle display device changes. 2019-06-13 08:21:00 +02:00
xcomposite.h
xdnd.c winex11.drv: Indicate whether the drop point is non-client area. 2019-08-19 20:27:03 +02:00
xim.c
xinerama.c winex11.drv: Make screen helpers independent of Xinerama. 2019-08-21 14:18:49 +02:00
xrandr.c winex11.drv: Add xrandr_get_screen_resources() helper. 2019-08-21 14:18:49 +02:00
xrender.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00
xvidmode.c gdi32: Make GDI driver functions cdecl. 2019-07-06 21:47:58 +02:00