[mutter/wip/surface-content: 10/10] window: Delay the showing of XWayland clients until set_window_id
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/surface-content: 10/10] window: Delay the showing of XWayland clients until set_window_id
- Date: Wed, 22 Jan 2014 14:50:26 +0000 (UTC)
commit cfe7863c41a906095022519041515ba45aefaeae
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jan 16 17:48:52 2014 -0500
window: Delay the showing of XWayland clients until set_window_id
Use our new "surface_mapped" field to delay the showing of XWayland clients
until we have associated together the window's XID and the Wayland surface ID.
This ensures that when we show this window to the compositor, it will properly
use the Wayland surface for rendering, rather than trying to use COMPOSITE and
crash.
src/core/window.c | 10 +++++++++-
src/wayland/meta-xwayland.c | 2 ++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 139551f..76e2df5 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1608,12 +1608,20 @@ meta_window_new (MetaDisplay *display,
goto error;
}
+ /* When running as an X compositor, we simply show the window when
+ * it's mapped.
+ *
+ * When running as a Wayland compositor, we need to wait until set_surface_id
+ * comes in, so we set surface_mapped to FALSE, and then change it to TRUE
+ * in our set_surface_id implementation */
+ gboolean initially_surface_visible = !meta_is_wayland_compositor ();
+
window = meta_window_new_shared (display,
screen,
META_WINDOW_CLIENT_TYPE_X11,
NULL,
xwindow,
- TRUE,
+ initially_surface_visible,
existing_wm_state,
effect,
&attrs);
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 02c5b7b..c9be272 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -48,6 +48,8 @@ xserver_set_window_id (struct wl_client *client,
{
surface->window = window;
window->surface = surface;
+
+ meta_window_set_surface_mapped (window, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]