mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
backend/x11: Allow querying xinput support
Undeprecate the XInput-related X11 API: since we don't enable XI support by default we still need to ask for it, and see if we have it after the backend initialization sequence.
This commit is contained in:
parent
c8cc03f8a7
commit
fa3c5a28a7
@ -244,7 +244,7 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
|
||||
if (XIQueryVersion (backend_x11->xdpy, &major, &minor) != BadRequest)
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "Creating XI2 device manager");
|
||||
|
||||
backend_x11->has_xinput = TRUE;
|
||||
backend_x11->device_manager =
|
||||
g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_XI2,
|
||||
"backend", backend_x11,
|
||||
@ -255,11 +255,13 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
|
||||
#endif /* HAVE_XINPUT_2 */
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "Creating Core+XI device manager");
|
||||
backend_x11->has_xinput = TRUE;
|
||||
backend_x11->device_manager =
|
||||
g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11,
|
||||
"backend", backend_x11,
|
||||
"event-base", first_event,
|
||||
NULL);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -267,6 +269,7 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
|
||||
#endif /* HAVE_XINPUT || HAVE_XINPUT_2 */
|
||||
{
|
||||
CLUTTER_NOTE (BACKEND, "Creating Core device manager");
|
||||
backend_x11->has_xinput = FALSE;
|
||||
backend_x11->device_manager =
|
||||
g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11,
|
||||
"backend", backend_x11,
|
||||
@ -831,8 +834,6 @@ clutter_x11_set_display (Display *xdpy)
|
||||
* want to use clutter_x11_has_xinput() to see if support was enabled.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6: This function does not do anything.
|
||||
*/
|
||||
void
|
||||
clutter_x11_enable_xinput (void)
|
||||
@ -1056,14 +1057,15 @@ clutter_x11_get_input_devices (void)
|
||||
* and XInput support is available at run time.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
* Deprecated: 1.6
|
||||
*/
|
||||
gboolean
|
||||
clutter_x11_has_xinput (void)
|
||||
{
|
||||
#if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2)
|
||||
return TRUE;
|
||||
if (backend_singleton != NULL)
|
||||
return backend_singleton->has_xinput;
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
|
@ -97,13 +97,10 @@ struct _ClutterBackendX11
|
||||
Atom atom_NET_WM_NAME;
|
||||
Atom atom_UTF8_STRING;
|
||||
|
||||
int xi_event_base;
|
||||
int event_types[CLUTTER_X11_XINPUT_LAST_EVENT];
|
||||
gboolean have_xinput;
|
||||
|
||||
Time last_event_time;
|
||||
|
||||
ClutterDeviceManager *device_manager;
|
||||
gboolean has_xinput;
|
||||
|
||||
XSettingsClient *xsettings;
|
||||
Window xsettings_xwin;
|
||||
|
Loading…
Reference in New Issue
Block a user