[mutter/gnome-3-22] compositor: Avoid thaw on inconsistent effect_completed calls
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-22] compositor: Avoid thaw on inconsistent effect_completed calls
- Date: Thu, 26 Jan 2017 11:35:14 +0000 (UTC)
commit 23c315ea7121e9bd108e2837d0b4beeba53c5e18
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 24 11:03:41 2017 +0100
compositor: Avoid thaw on inconsistent effect_completed calls
If the meta_window_actor_effect_completed() triggers inconsistent
accounting, there's also high chances that the thaw call will be
unexpected at this time too, which will lead to a g_error().
This makes mutter more lenient to effect_completed() calls of the
right type (i.e. those triggering freeze/thaw) being performed more
times than necessary in the upper parts. A warning will be issued,
but the process won't abort.
https://bugzilla.gnome.org/show_bug.cgi?id=777691
src/compositor/meta-window-actor.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 658a177..9395caa 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1129,6 +1129,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
MetaPluginEffect event)
{
MetaWindowActorPrivate *priv = self->priv;
+ gboolean inconsistent = FALSE;
/* NB: Keep in mind that when effects get completed it possible
* that the corresponding MetaWindow may have be been destroyed.
@@ -1145,6 +1146,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
{
g_warning ("Error in minimize accounting.");
priv->minimize_in_progress = 0;
+ inconsistent = TRUE;
}
}
break;
@@ -1155,6 +1157,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
{
g_warning ("Error in unminimize accounting.");
priv->unminimize_in_progress = 0;
+ inconsistent = TRUE;
}
}
break;
@@ -1169,6 +1172,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
{
g_warning ("Error in map accounting.");
priv->map_in_progress = 0;
+ inconsistent = TRUE;
}
break;
case META_PLUGIN_DESTROY:
@@ -1178,6 +1182,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
{
g_warning ("Error in destroy accounting.");
priv->destroy_in_progress = 0;
+ inconsistent = TRUE;
}
break;
case META_PLUGIN_SIZE_CHANGE:
@@ -1186,6 +1191,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
{
g_warning ("Error in size change accounting.");
priv->size_change_in_progress = 0;
+ inconsistent = TRUE;
}
break;
case META_PLUGIN_SWITCH_WORKSPACE:
@@ -1193,7 +1199,7 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
break;
}
- if (is_freeze_thaw_effect (event))
+ if (is_freeze_thaw_effect (event) && !inconsistent)
meta_window_actor_thaw (self);
if (!meta_window_actor_effect_in_progress (self))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]