forked from AuroraMiddleware/gtk
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. Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4160
This commit is contained in:
parent
9e5417c6c7
commit
824e983372
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user