mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/input-device: Replace device check with assertion
We only call _clutter_input_device_update with devices that are not Keyboard devices. Also passing a Keyboard device to a function whose primary purpose is picking should be considered a bug in the caller. https://gitlab.gnome.org/GNOME/mutter/merge_requests/547
This commit is contained in:
parent
30a2483e6e
commit
786305f7d6
@ -1036,9 +1036,10 @@ _clutter_input_device_update (ClutterInputDevice *device,
|
|||||||
ClutterActor *new_cursor_actor;
|
ClutterActor *new_cursor_actor;
|
||||||
ClutterActor *old_cursor_actor;
|
ClutterActor *old_cursor_actor;
|
||||||
ClutterPoint point = { -1, -1 };
|
ClutterPoint point = { -1, -1 };
|
||||||
|
ClutterInputDeviceType device_type = device->device_type;
|
||||||
|
|
||||||
if (device->device_type == CLUTTER_KEYBOARD_DEVICE)
|
g_assert (device_type != CLUTTER_KEYBOARD_DEVICE &&
|
||||||
return NULL;
|
device_type != CLUTTER_PAD_DEVICE);
|
||||||
|
|
||||||
stage = device->stage;
|
stage = device->stage;
|
||||||
if (G_UNLIKELY (stage == NULL))
|
if (G_UNLIKELY (stage == NULL))
|
||||||
|
Loading…
Reference in New Issue
Block a user