[gtk+/gtk-3-10] gdk: Ignore crossings generated by passive grabs when resetting scroll axes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] gdk: Ignore crossings generated by passive grabs when resetting scroll axes
- Date: Mon, 18 Nov 2013 23:25:33 +0000 (UTC)
commit 3a36c93840dd7f8d1981ec134b981e1f32910e6e
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Nov 18 22:12:18 2013 +0100
gdk: Ignore crossings generated by passive grabs when resetting scroll axes
Passive grabs may take pointer focus out of the application, even though
the pointer didn't leave the window, but those events still trigger resetting
of the scroll axes. This is most visible with compiz, and possibly other
reparenting WMs, where passive grabs happen on the WM-managed window that
is a parent of the application toplevel.
As it is not possible to have scrolling happening on the timespan a passive
grab takes action, it is entirely safe for GTK+ to assume none happened if
it gets a crossing event of that nature.
https://bugzilla.gnome.org/show_bug.cgi?id=699574#c33
gdk/x11/gdkdevicemanager-xi2.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index a2897b4..3481d29 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1567,7 +1567,8 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
GUINT_TO_POINTER (xev->sourceid));
gdk_event_set_source_device (event, source_device);
- if (ev->evtype == XI_Enter && xev->detail != XINotifyInferior &&
+ if (ev->evtype == XI_Enter &&
+ xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL)
{
if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]