diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c index 96114895ca..db5543b7b7 100644 --- a/gdk/x11/gdkdevicemanager-core-x11.c +++ b/gdk/x11/gdkdevicemanager-core-x11.c @@ -842,6 +842,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, */ if (toplevel->has_pointer && mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE; @@ -849,6 +853,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, case NotifyNonlinear: case NotifyNonlinearVirtual: if (mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_focus_window = (focus_in) ? TRUE : FALSE; /* We pretend that the focus moves to the grab @@ -864,6 +872,10 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window, * grab is in effect */ if (mode != NotifyGrab && +#ifdef XINPUT_2 + mode != XINotifyPassiveGrab && + mode != XINotifyPassiveUngrab && +#endif /* XINPUT_2 */ mode != NotifyUngrab) toplevel->has_pointer_focus = (focus_in) ? TRUE : FALSE; break;