winex11.drv: Handle FocusIn/NotifyGrab and FocusOut/NotifyUngrab events.

These events are received on mutter, when moving undecorated managed
windows, although Wine never grabs the keyboard itself.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2019-09-23 09:58:17 +02:00 committed by Alexandre Julliard
parent 9d92ea3b5a
commit ae8f605ede
1 changed files with 6 additions and 4 deletions

View File

@ -778,8 +778,9 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
switch (event->mode)
{
case NotifyGrab:
WARN( "unexpected FocusIn event with NotifyGrab mode\n" );
break;
/* these are received when moving undecorated managed windows on mutter */
keyboard_grabbed = TRUE;
return FALSE;
case NotifyWhileGrabbed:
keyboard_grabbed = TRUE;
break;
@ -879,8 +880,9 @@ static BOOL X11DRV_FocusOut( HWND hwnd, XEvent *xev )
switch (event->mode)
{
case NotifyUngrab:
WARN( "unexpected FocusOut event with NotifyUngrab mode\n" );
break;
/* these are received when moving undecorated managed windows on mutter */
keyboard_grabbed = FALSE;
return FALSE;
case NotifyNormal:
keyboard_grabbed = FALSE;
break;