cursor-tracker: Check for NULL coordinates before retrieving them
This makes Wayland consistent with X11 in not emitting warnings when unwanted parameters are NULL. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1519
This commit is contained in:
parent
ebe8cd3704
commit
aff14eab86
@ -501,7 +501,9 @@ get_pointer_position_clutter (graphene_point_t *point,
|
||||
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
cdevice = clutter_seat_get_pointer (seat);
|
||||
|
||||
clutter_input_device_get_coords (cdevice, NULL, point);
|
||||
if (point)
|
||||
clutter_input_device_get_coords (cdevice, NULL, point);
|
||||
|
||||
if (mods)
|
||||
*mods = clutter_input_device_get_modifier_state (cdevice);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user