[mutter/bilelmoussaoui/x11-build-guards: 33/35] core/events: Guard X11 types
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/x11-build-guards: 33/35] core/events: Guard X11 types
- Date: Tue, 2 Aug 2022 07:42:23 +0000 (UTC)
commit d6fbc903c70bf88d97939f82d4b7bf241fee70ca
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Wed Jun 1 10:06:55 2022 +0200
core/events: Guard X11 types
src/core/events.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index eca21f52e5..a4d4550321 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -27,14 +27,17 @@
#include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-dnd-private.h"
#include "backends/meta-idle-manager.h"
-#include "backends/x11/meta-backend-x11.h"
-#include "backends/x11/meta-input-device-x11.h"
#include "compositor/compositor-private.h"
#include "compositor/meta-window-actor-private.h"
#include "core/display-private.h"
#include "core/window-private.h"
#include "meta/meta-backend.h"
+#ifdef HAVE_X11_CLIENT
+#include "backends/x11/meta-backend-x11.h"
+#include "backends/x11/meta-input-device-x11.h"
+#endif
+
#ifdef HAVE_NATIVE_BACKEND
#include "backends/native/meta-backend-native.h"
#endif
@@ -178,6 +181,7 @@ sequence_is_pointer_emulated (MetaDisplay *display,
return FALSE;
}
+#ifdef HAVE_X11_CLIENT
static void
maybe_unfreeze_pointer_events (MetaBackend *backend,
const ClutterEvent *event,
@@ -216,6 +220,7 @@ maybe_unfreeze_pointer_events (MetaBackend *backend,
xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
XIAllowEvents (xdisplay, device_id, event_mode, event->button.time);
}
+#endif
static gboolean
meta_display_handle_event (MetaDisplay *display,
@@ -499,8 +504,9 @@ meta_display_handle_event (MetaDisplay *display,
{
/* Only replay button press events, since that's where we
* have the synchronous grab. */
+#ifdef HAVE_X11_CLIENT
maybe_unfreeze_pointer_events (backend, event, EVENTS_UNFREEZE_REPLAY);
-
+#endif
/* If the focus window has an active close dialog let clutter
* events go through, so fancy clutter dialogs can get to handle
* all events.
@@ -520,7 +526,9 @@ meta_display_handle_event (MetaDisplay *display,
/* We could not match the event with a window, make sure we sync
* the pointer to discard the sequence and don't keep events frozen.
*/
- maybe_unfreeze_pointer_events (backend, event, EVENTS_UNFREEZE_SYNC);
+#ifdef HAVE_X11_CLIENT
+ maybe_unfreeze_pointer_events (backend, event, EVENTS_UNFREEZE_SYNC);
+#endif
}
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]