[mutter] Revert "compositor: Delay meta_compositor_add_window until the first show"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Revert "compositor: Delay meta_compositor_add_window until the first show"
- Date: Wed, 19 Feb 2014 17:18:14 +0000 (UTC)
commit 870c6382ed93906a1e90ade06a8828fa65a7b408
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Feb 19 12:18:02 2014 -0500
Revert "compositor: Delay meta_compositor_add_window until the first show"
This reverts commit e3a93db712aea3c138b287786e4cd8d3ce0968d8.
src/compositor/compositor.c | 26 ++++++++++++++++----------
src/core/window.c | 7 +++++--
2 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index fead306..730c961 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -138,6 +138,19 @@ meta_compositor_destroy (MetaCompositor *compositor)
}
static void
+add_win (MetaWindow *window)
+{
+ MetaScreen *screen = meta_window_get_screen (window);
+ MetaCompScreen *info = meta_screen_get_compositor_data (screen);
+
+ g_return_if_fail (info != NULL);
+
+ meta_window_actor_new (window);
+
+ sync_actor_stacking (info);
+}
+
+static void
process_damage (MetaCompositor *compositor,
XDamageNotifyEvent *event,
MetaWindow *window)
@@ -725,20 +738,13 @@ meta_compositor_add_window (MetaCompositor *compositor,
{
MetaScreen *screen = meta_window_get_screen (window);
MetaDisplay *display = meta_screen_get_display (screen);
- MetaCompScreen *info = meta_screen_get_compositor_data (screen);
- g_return_if_fail (info != NULL);
+ DEBUG_TRACE ("meta_compositor_add_window\n");
+ meta_error_trap_push (display);
- /* Window was already added previously, probably coming
- * back from hiding */
- if (window->compositor_private != NULL)
- return;
+ add_win (window);
- meta_error_trap_push (display);
- meta_window_actor_new (window);
meta_error_trap_pop (display);
-
- sync_actor_stacking (info);
}
void
diff --git a/src/core/window.c b/src/core/window.c
index 56266a4..e4eb96d 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1474,6 +1474,9 @@ meta_window_new (MetaDisplay *display,
set_net_wm_state (window);
}
+ if (screen->display->compositor)
+ meta_compositor_add_window (screen->display->compositor, window);
+
/* Sync stack changes */
meta_stack_thaw (window->screen->stack);
@@ -3087,8 +3090,8 @@ meta_window_show (MetaWindow *window)
break;
}
- meta_compositor_add_window (window->display->compositor, window);
- meta_compositor_show_window (window->display->compositor, window, effect);
+ meta_compositor_show_window (window->display->compositor,
+ window, effect);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]