[mutter/wip/carlosg/xwayland-on-demand: 16/28] core: Manage only X11 windows when (re)starting
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/xwayland-on-demand: 16/28] core: Manage only X11 windows when (re)starting
- Date: Fri, 26 Jul 2019 12:32:16 +0000 (UTC)
commit e6101d76480c27b508ffd3d1d272aec6075a7372
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat May 25 12:00:47 2019 +0200
core: Manage only X11 windows when (re)starting
What "restart" means is somewhat different between x11 and wayland
sessions. A X11 compositor may restart itself, thus having to manage
again all the client windows that were running. A wayland compositor
cannot restart itself, but might restart X11, in which case there's
possibly a number of wayland clients, plus some x11 app that is
being started.
For the latter case, the assert will break, so just make it
conditional. Also rename the function so it's more clear that it
only affects X11 windows.
src/core/display-private.h | 2 +-
src/core/display.c | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 7ff572a1c6..d241e90905 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -264,7 +264,7 @@ struct _MetaDisplayClass
gboolean meta_display_open (void);
-void meta_display_manage_all_windows (MetaDisplay *display);
+void meta_display_manage_all_xwindows (MetaDisplay *display);
void meta_display_unmanage_windows (MetaDisplay *display,
guint32 timestamp);
diff --git a/src/core/display.c b/src/core/display.c
index 4f56673b9f..bc37f0a627 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -646,7 +646,7 @@ meta_display_init_x11 (MetaDisplay *display,
meta_x11_display_create_guard_window (x11_display);
if (!display->display_opening)
- meta_display_manage_all_windows (display);
+ meta_display_manage_all_xwindows (display);
return TRUE;
}
@@ -797,7 +797,7 @@ meta_display_open (void)
* we start out with no windows.
*/
if (!meta_is_wayland_compositor ())
- meta_display_manage_all_windows (display);
+ meta_display_manage_all_xwindows (display);
if (old_active_xwindow != None)
{
@@ -2448,7 +2448,7 @@ meta_resize_gravity_from_grab_op (MetaGrabOp op)
}
void
-meta_display_manage_all_windows (MetaDisplay *display)
+meta_display_manage_all_xwindows (MetaDisplay *display)
{
guint64 *_children;
guint64 *children;
@@ -2462,7 +2462,8 @@ meta_display_manage_all_windows (MetaDisplay *display)
for (i = 0; i < n_children; ++i)
{
- g_assert (META_STACK_ID_IS_X11 (children[i]));
+ if (!META_STACK_ID_IS_X11 (children[i]))
+ continue;
meta_window_x11_new (display, children[i], TRUE,
META_COMP_EFFECT_NONE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]