diff --git a/clutter/clutter-private.h b/clutter/clutter-private.h index 9100ebfd7..e2d5e2132 100644 --- a/clutter/clutter-private.h +++ b/clutter/clutter-private.h @@ -97,6 +97,8 @@ struct _ClutterInputDevice gint previous_y; guint32 previous_time; gint previous_button_number; + + guint is_default : 1; }; struct _ClutterStageManager diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c index 47ba733c7..c67963d1e 100644 --- a/clutter/x11/clutter-backend-x11.c +++ b/clutter/x11/clutter-backend-x11.c @@ -252,7 +252,12 @@ clutter_x11_register_input_devices (ClutterBackendX11 *backend) } if (info->use == IsXExtensionPointer && num_events > 0) - have_an_xpointer = TRUE; + { + /* mark it as a default */ + device->device.is_default = TRUE; + + have_an_xpointer = TRUE; + } device->num_events = n_events; @@ -313,11 +318,13 @@ default_device: d->previous_x = -1; d->previous_y = -1; d->previous_button_number = -1; + d->is_default = TRUE; _clutter_device_manager_add_device (manager, d); d = g_slice_new0 (ClutterInputDevice); d->id = 1; d->device_type = CLUTTER_KEYBOARD_DEVICE; + d->is_default = TRUE; _clutter_device_manager_add_device (manager, d); } }