From e1d87e891c43c4c40b0bdd2f2627286e9bffdef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Ignacio=20Aramend=C3=ADa?= Date: Tue, 24 Jun 2014 11:49:47 -0300 Subject: Add "effect_pending" flag Initialized at META_EFFECT_NONE. The management of this should be done by caller functions to effect functions. --- src/core/effects.h | 1 + src/core/window-private.h | 4 ++++ src/core/window.c | 1 + 3 files changed, 6 insertions(+) diff --git a/src/core/effects.h b/src/core/effects.h index ca25aa88..e0025ff6 100644 --- a/src/core/effects.h +++ b/src/core/effects.h @@ -50,6 +50,7 @@ typedef enum { + META_EFFECT_NONE = 0, META_EFFECT_MINIMIZE, META_EFFECT_UNMINIMIZE, META_EFFECT_FOCUS, diff --git a/src/core/window-private.h b/src/core/window-private.h index dcb19d7f..65359e15 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -36,6 +36,7 @@ #include #include "window.h" +#include "effects.h" #include "screen-private.h" #include "util.h" #include "stack.h" @@ -185,6 +186,9 @@ struct _MetaWindow guint was_minimized : 1; guint tab_unminimized : 1; + /* Whether there is a pending effect */ + MetaEffectType effect_pending; + /* Whether the window is mapped; actual server-side state * see also unmaps_pending */ diff --git a/src/core/window.c b/src/core/window.c index be982de3..652c098d 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -476,6 +476,7 @@ meta_window_new_with_attrs (MetaDisplay *display, window->minimized = FALSE; window->was_minimized = FALSE; window->tab_unminimized = FALSE; + window->effect_pending = META_EFFECT_NONE; window->iconic = FALSE; window->mapped = attrs->map_state != IsUnmapped; /* if already mapped, no need to worry about focus-on-first-time-showing */ -- cgit v1.2.1