Merge branch 'wip/carlosg/scroll-fix' into 'main'

gdk/x11: Reset all scroll valuators on enter

Closes #4160

See merge request GNOME/gtk!5479
This commit is contained in:
Matthias Clasen 2023-02-04 13:14:02 +00:00
commit 1a292bf8ab

View File

@ -2066,19 +2066,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;
GList *l;
physical_devices = gdk_device_list_physical_devices (source_device);
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