x11: Require XInput 2.3 at build time
The needed libXi version was released 5 years ago, so should be fine.
This commit is contained in:
parent
ecec99eedb
commit
176e6fcded
@ -94,7 +94,7 @@ MUTTER_PC_MODULES="
|
||||
xdamage
|
||||
xext
|
||||
xfixes
|
||||
xi >= 1.6.0
|
||||
xi >= 1.6.99.1
|
||||
xkbfile
|
||||
xkeyboard-config
|
||||
xkbcommon >= 0.4.3
|
||||
@ -347,9 +347,6 @@ AC_DEFINE_UNQUOTED([XWAYLAND_GRAB_DEFAULT_ACCESS_RULES],
|
||||
[Xwayland applications allowed to issue keyboard grabs])
|
||||
AC_SUBST(XWAYLAND_GRAB_DEFAULT_ACCESS_RULES)
|
||||
|
||||
PKG_CHECK_EXISTS([xi >= 1.6.99.1],
|
||||
AC_DEFINE([HAVE_XI23],[1],[Define if you have support for XInput 2.3 or greater]))
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
|
@ -180,11 +180,9 @@ meta_barrier_constructed (GObject *object)
|
||||
if (META_IS_BACKEND_NATIVE (meta_get_backend ()))
|
||||
priv->impl = meta_barrier_impl_native_new (barrier);
|
||||
#endif
|
||||
#if defined(HAVE_XI23)
|
||||
if (META_IS_BACKEND_X11 (meta_get_backend ()) &&
|
||||
!meta_is_wayland_compositor ())
|
||||
priv->impl = meta_barrier_impl_x11_new (barrier);
|
||||
#endif
|
||||
|
||||
if (priv->impl == NULL)
|
||||
g_warning ("Created a non-working barrier");
|
||||
|
@ -31,8 +31,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_XI23
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
@ -217,5 +215,3 @@ static void
|
||||
meta_barrier_impl_x11_init (MetaBarrierImplX11 *self)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* HAVE_XI23 */
|
||||
|
@ -85,13 +85,11 @@ get_input_event (MetaX11Display *x11_display,
|
||||
if (((XIEnterEvent *) input_event)->deviceid == META_VIRTUAL_CORE_POINTER_ID)
|
||||
return input_event;
|
||||
break;
|
||||
#ifdef HAVE_XI23
|
||||
case XI_BarrierHit:
|
||||
case XI_BarrierLeave:
|
||||
if (((XIBarrierEvent *) input_event)->deviceid == META_VIRTUAL_CORE_POINTER_ID)
|
||||
return input_event;
|
||||
break;
|
||||
#endif /* HAVE_XI23 */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -117,11 +115,9 @@ xievent_get_modified_window (MetaX11Display *x11_display,
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
return ((XIEnterEvent *) input_event)->event;
|
||||
#ifdef HAVE_XI23
|
||||
case XI_BarrierHit:
|
||||
case XI_BarrierLeave:
|
||||
return ((XIBarrierEvent *) input_event)->event;
|
||||
#endif /* HAVE_XI23 */
|
||||
}
|
||||
|
||||
return None;
|
||||
@ -380,14 +376,12 @@ meta_spew_xi2_event (MetaX11Display *x11_display,
|
||||
case XI_Leave:
|
||||
name = "XI_Leave";
|
||||
break;
|
||||
#ifdef HAVE_XI23
|
||||
case XI_BarrierHit:
|
||||
name = "XI_BarrierHit";
|
||||
break;
|
||||
case XI_BarrierLeave:
|
||||
name = "XI_BarrierLeave";
|
||||
break;
|
||||
#endif /* HAVE_XI23 */
|
||||
}
|
||||
|
||||
switch (input_event->evtype)
|
||||
@ -1812,13 +1806,11 @@ meta_x11_display_handle_xevent (MetaX11Display *x11_display,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_XI23
|
||||
if (meta_x11_display_process_barrier_xevent (x11_display, input_event))
|
||||
{
|
||||
bypass_gtk = bypass_compositor = TRUE;
|
||||
goto out;
|
||||
}
|
||||
#endif /* HAVE_XI23 */
|
||||
|
||||
if (handle_input_xevent (x11_display, input_event, event->xany.serial))
|
||||
{
|
||||
|
@ -147,12 +147,8 @@ struct _MetaX11Display
|
||||
unsigned int have_damage : 1;
|
||||
#define META_X11_DISPLAY_HAS_COMPOSITE(x11_display) ((x11_display)->have_composite)
|
||||
#define META_X11_DISPLAY_HAS_DAMAGE(x11_display) ((x11_display)->have_damage)
|
||||
#ifdef HAVE_XI23
|
||||
gboolean have_xinput_23 : 1;
|
||||
#define META_X11_DISPLAY_HAS_XINPUT_23(x11_display) ((x11_display)->have_xinput_23)
|
||||
#else
|
||||
#define META_X11_DISPLAY_HAS_XINPUT_23(x11_display) FALSE
|
||||
#endif /* HAVE_XI23 */
|
||||
};
|
||||
|
||||
MetaX11Display *meta_x11_display_new (MetaDisplay *display, GError **error);
|
||||
@ -182,10 +178,8 @@ void meta_x11_display_register_sync_alarm (MetaX11Display *x11_display,
|
||||
void meta_x11_display_unregister_sync_alarm (MetaX11Display *x11_display,
|
||||
XSyncAlarm alarm);
|
||||
|
||||
#ifdef HAVE_XI23
|
||||
gboolean meta_x11_display_process_barrier_xevent (MetaX11Display *x11_display,
|
||||
XIEvent *event);
|
||||
#endif /* HAVE_XI23 */
|
||||
|
||||
void meta_x11_display_set_alarm_filter (MetaX11Display *x11_display,
|
||||
MetaAlarmFilter filter,
|
||||
|
@ -407,10 +407,8 @@ query_xi_extension (MetaX11Display *x11_display)
|
||||
if (version >= 22)
|
||||
has_xi = TRUE;
|
||||
|
||||
#ifdef HAVE_XI23
|
||||
if (version >= 23)
|
||||
x11_display->have_xinput_23 = TRUE;
|
||||
#endif /* HAVE_XI23 */
|
||||
}
|
||||
}
|
||||
|
||||
@ -784,13 +782,11 @@ init_event_masks (MetaX11Display *x11_display)
|
||||
XISetMask (mask.mask, XI_Leave);
|
||||
XISetMask (mask.mask, XI_FocusIn);
|
||||
XISetMask (mask.mask, XI_FocusOut);
|
||||
#ifdef HAVE_XI23
|
||||
if (META_X11_DISPLAY_HAS_XINPUT_23 (x11_display))
|
||||
{
|
||||
XISetMask (mask.mask, XI_BarrierHit);
|
||||
XISetMask (mask.mask, XI_BarrierLeave);
|
||||
}
|
||||
#endif /* HAVE_XI23 */
|
||||
XISelectEvents (x11_display->xdisplay, x11_display->xroot, &mask, 1);
|
||||
|
||||
event_mask = (SubstructureRedirectMask | SubstructureNotifyMask |
|
||||
|
Loading…
Reference in New Issue
Block a user