Merge branch 'cherry-pick-824e9833' into 'gtk-4-8'

[4.8.x] gdk/x11: Reset all scroll valuators on enter

See merge request GNOME/gtk!5480
This commit is contained in:
Matthias Clasen 2023-02-07 02:34:50 +00:00
commit 790b9d59ad

View File

@ -2064,19 +2064,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab && xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
GDK_IS_TOPLEVEL (surface)) GDK_IS_TOPLEVEL (surface))
{ {
if (gdk_x11_device_xi2_get_device_type ((GdkX11DeviceXI2 *) device) != GDK_X11_DEVICE_TYPE_LOGICAL) GList *l;
_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); for (l = device_manager->devices; l; l = l->next)
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data));
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);
}
} }
event = gdk_crossing_event_new (ev->evtype == XI_Enter event = gdk_crossing_event_new (ev->evtype == XI_Enter