diff --git a/configure.ac b/configure.ac index eb1215cbc..1af7dbb83 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/src/backends/meta-barrier.c b/src/backends/meta-barrier.c index fb14a5644..3b108c5e7 100644 --- a/src/backends/meta-barrier.c +++ b/src/backends/meta-barrier.c @@ -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"); diff --git a/src/backends/x11/meta-barrier-x11.c b/src/backends/x11/meta-barrier-x11.c index 5e5f8f2a8..d8231b607 100644 --- a/src/backends/x11/meta-barrier-x11.c +++ b/src/backends/x11/meta-barrier-x11.c @@ -31,8 +31,6 @@ #include "config.h" -#ifdef HAVE_XI23 - #include #include #include @@ -217,5 +215,3 @@ static void meta_barrier_impl_x11_init (MetaBarrierImplX11 *self) { } - -#endif /* HAVE_XI23 */ diff --git a/src/x11/events.c b/src/x11/events.c index edecce491..517cf6ec5 100644 --- a/src/x11/events.c +++ b/src/x11/events.c @@ -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)) { diff --git a/src/x11/meta-x11-display-private.h b/src/x11/meta-x11-display-private.h index fdd642bbc..54bbcf7f2 100644 --- a/src/x11/meta-x11-display-private.h +++ b/src/x11/meta-x11-display-private.h @@ -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, diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index 50991ecf8..485d04b88 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -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 |