[mutter/bilelmoussaoui/gdk-x11-only: 6/6] core: Add a copy of GDK_PRIORITY_EVENTS
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/gdk-x11-only: 6/6] core: Add a copy of GDK_PRIORITY_EVENTS
- Date: Mon, 9 May 2022 09:49:22 +0000 (UTC)
commit 3ac9748bbde73ffe96957d6df2eb991820aaaeda
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Mon May 9 11:48:57 2022 +0200
core: Add a copy of GDK_PRIORITY_EVENTS
src/core/events.h | 8 ++++++++
src/tests/test-client.c | 2 +-
src/wayland/meta-wayland.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/core/events.h b/src/core/events.h
index 6338119ae7..af74e86b39 100644
--- a/src/core/events.h
+++ b/src/core/events.h
@@ -25,6 +25,14 @@
#include "meta/display.h"
+/**
+ * META_PRIORITY_EVENTS: (value 0)
+ *
+ * This is the priority that events from the X server are given in the main loop.
+ */
+#define META_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
+
+
void meta_display_init_events (MetaDisplay *display);
void meta_display_free_events (MetaDisplay *display);
diff --git a/src/tests/test-client.c b/src/tests/test-client.c
index 0007d61ea2..d1f7fd0851 100644
--- a/src/tests/test-client.c
+++ b/src/tests/test-client.c
@@ -156,7 +156,7 @@ ensure_xsource_handler (GdkDisplay *gdkdisplay)
x_source->event_poll_fd.events = G_IO_IN;
g_source_add_poll (source, &x_source->event_poll_fd);
- g_source_set_priority (source, GDK_PRIORITY_EVENTS - 1);
+ g_source_set_priority (source, META_PRIORITY_EVENTS - 1);
g_source_set_can_recurse (source, TRUE);
g_source_attach (source, NULL);
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 6e2b56dd44..5b88ad9e1a 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -31,6 +31,7 @@
#include "clutter/clutter.h"
#include "cogl/cogl-egl.h"
#include "compositor/meta-surface-actor-wayland.h"
+#include "core/events.h"
#include "core/meta-context-private.h"
#include "wayland/meta-wayland-activation.h"
#include "wayland/meta-wayland-buffer.h"
@@ -574,7 +575,7 @@ meta_wayland_compositor_new (MetaContext *context)
* relating to X clients when we don't know what's happened to them
* according to the X protocol.
*/
- g_source_set_priority (wayland_event_source, GDK_PRIORITY_EVENTS + 1);
+ g_source_set_priority (wayland_event_source, META_PRIORITY_EVENTS + 1);
g_source_attach (wayland_event_source, NULL);
compositor->source = wayland_event_source;
g_source_unref (wayland_event_source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]