[mutter/wayland] display: Clean up creation of the guard window a bit...
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] display: Clean up creation of the guard window a bit...
- Date: Mon, 3 Feb 2014 22:34:33 +0000 (UTC)
commit 3e73babaf73a9fd2e6487540a3844e4ccfbea2e3
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Feb 1 23:09:53 2014 -0500
display: Clean up creation of the guard window a bit...
Do it consistently in all code paths...
src/core/display.c | 22 ++++++----------------
src/core/screen.c | 15 +++++++++------
2 files changed, 15 insertions(+), 22 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index a8ed432..37aab06 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -830,22 +830,12 @@ meta_display_open (void)
{
MetaScreen *screen = tmp->data;
- if (meta_is_wayland_compositor ())
- {
- /* Instead of explicitly enumerating all windows during
- * initialization, when we run as a wayland compositor we can rely on
- * xwayland notifying us of all top level windows so we create
- * MetaWindows when we get those notifications.
- *
- * We still want a guard window so we can avoid
- * unmapping/withdrawing minimized windows for live
- * thumbnails...
- */
- if (screen->guard_window == None)
- screen->guard_window =
- meta_screen_create_guard_window (screen->display->xdisplay, screen);
- }
- else
+ meta_screen_create_guard_window (screen);
+
+ /* We know that if mutter is running as a Wayland compositor,
+ * we start out with no windows.
+ */
+ if (!meta_is_wayland_compositor ())
meta_screen_manage_all_windows (screen);
tmp = tmp->next;
diff --git a/src/core/screen.c b/src/core/screen.c
index e1e9671..e8e8c56 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -445,8 +445,8 @@ reload_monitor_infos (MetaScreen *screen)
* should effectively be forwarded to events on the background actor,
* providing that the scene graph is set up correctly.
*/
-Window
-meta_screen_create_guard_window (Display *xdisplay, MetaScreen *screen)
+static Window
+create_guard_window (Display *xdisplay, MetaScreen *screen)
{
XSetWindowAttributes attributes;
Window guard_window;
@@ -878,16 +878,19 @@ meta_screen_free (MetaScreen *screen,
}
void
+meta_screen_create_guard_window (MetaScreen *screen)
+{
+ if (screen->guard_window == None)
+ screen->guard_window = create_guard_window (screen->display->xdisplay, screen);
+}
+
+void
meta_screen_manage_all_windows (MetaScreen *screen)
{
MetaStackWindow *_children;
MetaStackWindow *children;
int n_children, i;
- if (screen->guard_window == None)
- screen->guard_window =
- meta_screen_create_guard_window (screen->display->xdisplay, screen);
-
meta_stack_freeze (screen->stack);
meta_stack_tracker_get_stack (screen->stack_tracker, &_children, &n_children);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]