mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
backend: Ignore events without source_device for pointer visibility
There can be events which don't not have source devices set on them, because
they are not backed by real hardware and rather generated by us, for example
IM events coming from the shell's OSK.
So don't assume all events have a source device in
update_pointer_visibility_from_event() and rather ignore those without one,
as we are only interested in events coming from "real hardware" here.
This fixes an issue where the mouse pointer would appear on devices without
any input from actual mice/touchpads on OSK key presses.
Fixes: 6aa42d6dad
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3236>
This commit is contained in:
parent
aa6888e6bd
commit
e303551745
@ -1053,6 +1053,9 @@ update_pointer_visibility_from_event (MetaBackend *backend,
|
|||||||
g_warn_if_fail (!priv->in_init);
|
g_warn_if_fail (!priv->in_init);
|
||||||
|
|
||||||
device = clutter_event_get_source_device (event);
|
device = clutter_event_get_source_device (event);
|
||||||
|
if (!device)
|
||||||
|
return;
|
||||||
|
|
||||||
device_type = clutter_input_device_get_device_type (device);
|
device_type = clutter_input_device_get_device_type (device);
|
||||||
time_ms = clutter_event_get_time (event);
|
time_ms = clutter_event_get_time (event);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user