[mutter/meego-1.0: 11/30] [MutterWindow] Remove invalid asserts
- From: Tomas Frydrych <tomasf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/meego-1.0: 11/30] [MutterWindow] Remove invalid asserts
- Date: Fri, 14 May 2010 15:50:41 +0000 (UTC)
commit 66326ac75442c81b860ee66e542966a6a6ddb5fb
Author: Tomas Frydrych <tf linux intel com>
Date: Tue Jan 19 16:46:00 2010 +0000
[MutterWindow] Remove invalid asserts
When a window is moved from one workspace onto another, its visibility status
can change while it is enqueued for visibility calculation. For example, window
can be initially visible, then enqued to be hidden due to change of its
workspace, and then enqueued again (before the original queue request has been
processed) to be shown due to the change of active workspace. The net effect of
this is that the mutter_window_show() and mutter_window_hide() can be called
on the window that is already in the correct state.
I can't think of a way to fix this without introducing further complexity to
the queue (i.e., so that two subsequent queue requests can cancel out). This
commit changes the two functions to simply return immediately if this scenario
happens.
src/compositor/mutter-window.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c
index 4d67f7b..c0d56ea 100644
--- a/src/compositor/mutter-window.c
+++ b/src/compositor/mutter-window.c
@@ -1100,7 +1100,8 @@ mutter_window_show (MutterWindow *self,
priv = self->priv;
info = meta_screen_get_compositor_data (priv->screen);
- g_return_if_fail (!priv->visible);
+ if (priv->visible)
+ return;
self->priv->visible = TRUE;
@@ -1142,7 +1143,8 @@ mutter_window_hide (MutterWindow *self,
priv = self->priv;
info = meta_screen_get_compositor_data (priv->screen);
- g_return_if_fail (priv->visible);
+ if (!priv->visible)
+ return;
priv->visible = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]