From: Simon McVittie Date: Sat, 4 Feb 2023 15:11:38 +0000 (+0000) Subject: Add patch from 4.9.x to avoid scroll events being sent to more than one window under X11 X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~2^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7a3033e554b8a33dc9532b3afc219c2c9ff04af3;p=gtk4.git Add patch from 4.9.x to avoid scroll events being sent to more than one window under X11 Closes: #1029972 LP: #1993594 --- diff --git a/debian/patches/gdk-x11-Reset-all-scroll-valuators-on-enter.patch b/debian/patches/gdk-x11-Reset-all-scroll-valuators-on-enter.patch new file mode 100644 index 0000000000..948652bf93 --- /dev/null +++ b/debian/patches/gdk-x11-Reset-all-scroll-valuators-on-enter.patch @@ -0,0 +1,45 @@ +From: Carlos Garnacho +Date: Sat, 4 Feb 2023 13:10:42 +0100 +Subject: gdk/x11: Reset all scroll valuators on enter + +We no longer need to make much distinction between multiple logical +devices, plus it breaks esp. with the Xwayland input device distribution. +Just iterate across all devices and reset their scroll valuators. + +Origin: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5479 +Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4160 +Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/5202 +Bug-Debian: https://bugs.debian.org/1029972 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk4/+bug/1993594 +Applied-upstream: 4.9.3, commit:824e983372d939693f7eba5c394e647a9035a0f8 +--- + gdk/x11/gdkdevicemanager-xi2.c | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c +index 02ceb2f..dd3f86c0 100644 +--- a/gdk/x11/gdkdevicemanager-xi2.c ++++ b/gdk/x11/gdkdevicemanager-xi2.c +@@ -2064,19 +2064,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, + xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab && + GDK_IS_TOPLEVEL (surface)) + { +- if (gdk_x11_device_xi2_get_device_type ((GdkX11DeviceXI2 *) device) != GDK_X11_DEVICE_TYPE_LOGICAL) +- _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device)); +- else +- { +- GList *physical_devices, *l; +- +- physical_devices = gdk_device_list_physical_devices (source_device); ++ GList *l; + +- for (l = physical_devices; l; l = l->next) +- _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data)); +- +- g_list_free (physical_devices); +- } ++ for (l = device_manager->devices; l; l = l->next) ++ _gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data)); + } + + event = gdk_crossing_event_new (ev->evtype == XI_Enter diff --git a/debian/patches/series b/debian/patches/series index c76f469122..f029df3c7e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,6 +9,7 @@ Update-Turkish-translation-2.patch testsuite-Use-separate-setups-for-unstable-tests-instead-.patch testsuite-Don-t-create-.test-files-for-flaky-or-failing-t.patch node-editor-Save-test-data-relative-to-current-working-di.patch +gdk-x11-Reset-all-scroll-valuators-on-enter.patch debian/reftest_compare_surfaces-Report-how-much-the-images-diffe.patch debian/reftests-Allow-minor-differences-to-be-tolerated.patch debian/Disable-inscription-markup.ui-reftest.patch