mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
display: Initialize XInput2
Make sure it's the correct version. https://bugzilla.gnome.org/show_bug.cgi?id=688779
This commit is contained in:
parent
dd4e655e2b
commit
f0c1e39fb7
@ -283,7 +283,10 @@ struct _MetaDisplay
|
|||||||
int damage_error_base;
|
int damage_error_base;
|
||||||
int xfixes_event_base;
|
int xfixes_event_base;
|
||||||
int xfixes_error_base;
|
int xfixes_error_base;
|
||||||
|
int xinput_error_base;
|
||||||
|
int xinput_event_base;
|
||||||
|
int xinput_opcode;
|
||||||
|
|
||||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||||
SnDisplay *sn_display;
|
SnDisplay *sn_display;
|
||||||
#endif
|
#endif
|
||||||
|
@ -779,7 +779,26 @@ meta_display_open (void)
|
|||||||
the_display->xfixes_error_base,
|
the_display->xfixes_error_base,
|
||||||
the_display->xfixes_event_base);
|
the_display->xfixes_event_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int major = 2, minor = 2;
|
||||||
|
gboolean has_xi = FALSE;
|
||||||
|
|
||||||
|
if (XQueryExtension (the_display->xdisplay,
|
||||||
|
"XInputExtension",
|
||||||
|
&the_display->xinput_opcode,
|
||||||
|
&the_display->xinput_error_base,
|
||||||
|
&the_display->xinput_event_base))
|
||||||
|
{
|
||||||
|
if (XIQueryVersion (the_display->xdisplay, &major, &minor) == Success)
|
||||||
|
if (((major * 10) + minor) >= 22)
|
||||||
|
has_xi = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!has_xi)
|
||||||
|
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_XCURSOR
|
#ifdef HAVE_XCURSOR
|
||||||
{
|
{
|
||||||
XcursorSetTheme (the_display->xdisplay, meta_prefs_get_cursor_theme ());
|
XcursorSetTheme (the_display->xdisplay, meta_prefs_get_cursor_theme ());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user