diff -u gtk+2.0-2.17.11/debian/changelog gtk+2.0-2.17.11/debian/changelog --- gtk+2.0-2.17.11/debian/changelog +++ gtk+2.0-2.17.11/debian/changelog @@ -1,3 +1,15 @@ +gtk+2.0 (2.17.11-1ubuntu2) karmic; urgency=low + * Applied 3 patches from Carlos Garnacho, fixes off cursor position in GTK + applications when using an extended input device (Like a tablet). LP: #410267 + + debian/patches/080_Always-report-XInput-events-to-the-grab-window-if-any.patch: + Patch to always report XInput events to the grab window if any. + + debian/patches/081_Block-extended-events-to-windows-that-didnt-select.patch: + Patch to block extended events to windows that didn't select them. + + debian/patches/082_Fix-xy-coordinates-for-extended-events.patch: + Patch to fix x/y coordinates for extended events. + + -- Mathieu Comandon Tue, 22 Sep 2009 12:13:06 +0200 + gtk+2.0 (2.17.11-1ubuntu1) karmic; urgency=low * debian/rules: diff -u gtk+2.0-2.17.11/debian/patches/series gtk+2.0-2.17.11/debian/patches/series --- gtk+2.0-2.17.11/debian/patches/series +++ gtk+2.0-2.17.11/debian/patches/series @@ -17,0 +18,3 @@ +080_Always-report-XInput-events-to-the-grab-window-if-any.patch +081_Block-extended-events-to-windows-that-didnt-select.patch +082_Fix-xy-coordinates-for-extended-events.patch only in patch2: unchanged: --- gtk+2.0-2.17.11.orig/debian/patches/082_Fix-xy-coordinates-for-extended-events.patch +++ gtk+2.0-2.17.11/debian/patches/082_Fix-xy-coordinates-for-extended-events.patch @@ -0,0 +1,20 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/410267 +# Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=588649 +# Patch: https://bugzilla.gnome.org/attachment.cgi?id=143623 +# Description: The grab window should be the first option to send events to +# , else we may get unpaired events, making display->ignore_core_events go crazy. +# +--- gtk+2.0-2.17.11.orig/gdk/x11/gdkinput-x11.c 2009-09-22 11:59:07.221243502 +0200 ++++ gtk+2.0-2.17.11/gdk/x11/gdkinput-x11.c 2009-09-22 11:59:13.691732703 +0200 +@@ -456,8 +456,8 @@ + x_scale = gdk_screen_get_width (gdk_drawable_get_screen (window)) / device_width; + y_scale = gdk_screen_get_height (gdk_drawable_get_screen (window)) / device_height; + +- x_offset = - impl_window->input_window->root_x; +- y_offset = - impl_window->input_window->root_y; ++ x_offset = - impl_window->input_window->root_x - priv->abs_x; ++ y_offset = - impl_window->input_window->root_y - priv->abs_y; + } + else /* GDK_MODE_WINDOW */ + { only in patch2: unchanged: --- gtk+2.0-2.17.11.orig/debian/patches/081_Block-extended-events-to-windows-that-didnt-select.patch +++ gtk+2.0-2.17.11/debian/patches/081_Block-extended-events-to-windows-that-didnt-select.patch @@ -0,0 +1,15 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/410267 +# Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=588649 +# Patch: https://bugzilla.gnome.org/attachment.cgi?id=143622 +# Description: Block extended events to windows that didn't select them. +# +--- a/gdk/x11/gdkinput-xfree.c ++++ b/gdk/x11/gdkinput-xfree.c +@@ -272,6 +272,7 @@ _gdk_input_other_event (GdkEvent *event, + return FALSE; + + if (gdkdev->info.mode == GDK_MODE_DISABLED || ++ priv->extension_events == 0 || + !(gdkdev->info.has_cursor || (priv->extension_events & GDK_ALL_DEVICES_MASK))) + return FALSE; only in patch2: unchanged: --- gtk+2.0-2.17.11.orig/debian/patches/080_Always-report-XInput-events-to-the-grab-window-if-any.patch +++ gtk+2.0-2.17.11/debian/patches/080_Always-report-XInput-events-to-the-grab-window-if-any.patch @@ -0,0 +1,33 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/410267 +# Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=588649 +# Patch: https://bugzilla.gnome.org/attachment.cgi?id=143621 +# Description: Fix x/y coordinates for extended events. +# +--- gtk+2.0-2.17.11.orig/gdk/x11/gdkinput-xfree.c 2009-08-29 18:20:04.000000000 +0200 ++++ gtk+2.0-2.17.11/gdk/x11/gdkinput-xfree.c 2009-09-22 11:55:16.367731112 +0200 +@@ -256,17 +256,18 @@ + if (event_type == GDK_NOTHING) + return FALSE; + +- window = _gdk_window_get_input_window_for_event (event_window, +- event_type, +- x, y, +- xevent->xany.serial); + /* If we're not getting any event window its likely because we're outside the + window and there is no grab. We should still report according to the + implicit grab though. */ + iw = ((GdkWindowObject *)event_window)->input_window; +- if (window == NULL) +- window = iw->button_down_window; + ++ if (iw->button_down_window) ++ window = iw->button_down_window; ++ else ++ window = _gdk_window_get_input_window_for_event (event_window, ++ event_type, ++ x, y, ++ xevent->xany.serial); + priv = (GdkWindowObject *)window; + if (window == NULL) + return FALSE;