[mutter] wayland/output: Flush clients after creating wl_output global
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/output: Flush clients after creating wl_output global
- Date: Wed, 30 Aug 2017 05:55:41 +0000 (UTC)
commit 2a318eb3f23267eb3688c74331763623b88836f5
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Aug 18 14:16:22 2017 +0800
wayland/output: Flush clients after creating wl_output global
In order to give the clients the best chance to bind the wl_output
before we later remove it (for example on fast hot plugs or in the test
suite), flush the client sockets after creating the global.
https://bugzilla.gnome.org/show_bug.cgi?id=730551
src/wayland/meta-wayland-outputs.c | 3 +++
src/wayland/meta-wayland.c | 6 ++++++
src/wayland/meta-wayland.h | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index 7cb10f9..db8d240 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -307,6 +307,8 @@ static MetaWaylandOutput *
meta_wayland_output_new (MetaWaylandCompositor *compositor,
MetaLogicalMonitor *logical_monitor)
{
+ MetaWaylandCompositor *wayland_compositor =
+ meta_wayland_compositor_get_default ();
MetaWaylandOutput *wayland_output;
wayland_output = g_object_new (META_TYPE_WAYLAND_OUTPUT, NULL);
@@ -314,6 +316,7 @@ meta_wayland_output_new (MetaWaylandCompositor *compositor,
&wl_output_interface,
META_WL_OUTPUT_VERSION,
wayland_output, bind_output);
+ meta_wayland_compositor_flush_clients (wayland_compositor);
meta_wayland_output_set_logical_monitor (wayland_output, logical_monitor);
return wayland_output;
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 414c7fb..9650882 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -445,3 +445,9 @@ meta_wayland_compositor_is_shortcuts_inhibited (MetaWaylandCompositor *composito
return FALSE;
}
+
+void
+meta_wayland_compositor_flush_clients (MetaWaylandCompositor *compositor)
+{
+ wl_display_flush_clients (compositor->wayland_display);
+}
diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h
index 95e796e..d5795c1 100644
--- a/src/wayland/meta-wayland.h
+++ b/src/wayland/meta-wayland.h
@@ -63,5 +63,7 @@ void meta_wayland_compositor_restore_shortcuts (MetaWayl
gboolean meta_wayland_compositor_is_shortcuts_inhibited (MetaWaylandCompositor *compositor,
ClutterInputDevice *source);
+void meta_wayland_compositor_flush_clients (MetaWaylandCompositor *compositor);
+
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]