summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-02 17:20:58 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-02 17:20:58 +0800
commit06ae53e3d46df5fd2e7709b7e8134bd34289cd70 (patch)
tree04e3059435d5a07cfdb10c8c60f9c0b2a712b5bb
parentf627da78201b500eaa36c15e777799001e480a57 (diff)
downloadextrawm-06ae53e3d46df5fd2e7709b7e8134bd34289cd70.tar.gz
extrawm-06ae53e3d46df5fd2e7709b7e8134bd34289cd70.tar.bz2
Save windows that are currently unmapped and demanding attention - they might be mapped again at some point and we need to save their state in order to activate them
-rw-r--r--src/extrawm.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/extrawm.cpp b/src/extrawm.cpp
index 18f7e36..493979a 100644
--- a/src/extrawm.cpp
+++ b/src/extrawm.cpp
@@ -59,17 +59,6 @@ ExtraWMScreen::updateAttentionWindow (CompWindow *w)
if (w->wmType () & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))
return;
- if (!w->mapNum () || !w->isViewable ())
- {
- if (!w->minimized () &&
- !w->inShowDesktopMode () &&
- !w->shaded ())
- return;
- }
-
- if (w->state () & CompWindowStateSkipTaskbarMask)
- return;
-
hints = XGetWMHints (screen->dpy (), w->id ());
if (hints)
{
@@ -94,10 +83,30 @@ ExtraWMScreen::activateDemandsAttention (CompAction *action,
if (!es->attentionWindows.empty ())
{
- CompWindow *w = es->attentionWindows.front ();
+ CompWindowList::iterator it = es->attentionWindows.begin ();
+
+ /* We want to keep these windows in the list and skip over them
+ * if they are currently unmapped (since they could be mapped
+ * again, and that would mean that we'd want to handle them
+ * if they became wanting attention again) */
- es->attentionWindows.pop_front ();
- w->activate ();
+ for (; it != es->attentionWindows.end (); it++)
+ {
+ CompWindow *w = *it;
+
+ if (!w->mapNum () || !w->isViewable ())
+ {
+ if (!w->minimized () &&
+ !w->inShowDesktopMode () &&
+ !w->shaded ())
+ {
+ continue;
+ }
+ }
+
+ w->activate ();
+ break;
+ }
}
return false;