mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
input-device: Warn if the device has no associated stage
Discarding the event without any warning when the device has no associated stage makes it hard to find the bug for people implementing new event backends. We should really warn for that abnormal condition in _clutter_input_device_update().
This commit is contained in:
parent
c20beabf93
commit
ac431ac21d
@ -513,8 +513,12 @@ _clutter_input_device_update (ClutterInputDevice *device)
|
||||
g_return_val_if_fail (device->device_type == CLUTTER_POINTER_DEVICE, NULL);
|
||||
|
||||
stage = device->stage;
|
||||
if (stage == NULL)
|
||||
return NULL;
|
||||
if (G_UNLIKELY (stage == NULL))
|
||||
{
|
||||
g_warning ("No stage defined for device '%s'",
|
||||
clutter_input_device_get_device_name (device));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
clutter_input_device_get_device_coords (device, &x, &y);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user