summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2009-11-16 14:47:24 +0800
committerSam Spilsbury <smspillaz@gmail.com>2009-11-16 14:47:24 +0800
commitb8a99bd455eee19407aa469f7b6fe7a60b3c9ab6 (patch)
treea5a80738e3b213678df7b1474cec6afc11292d56
parent5e4f5e5c9e1006446f6020212c40b85932284ff5 (diff)
downloadwinrules-b8a99bd455eee19407aa469f7b6fe7a60b3c9ab6.tar.gz
winrules-b8a99bd455eee19407aa469f7b6fe7a60b3c9ab6.tar.bz2
Traverse a copy of the list
-rw-r--r--src/winrules.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/winrules.cpp b/src/winrules.cpp
index 4b2cd0e..f277137 100644
--- a/src/winrules.cpp
+++ b/src/winrules.cpp
@@ -321,7 +321,13 @@ WinrulesScreen::optionChanged (CompOption *option,
if (updateStateMask)
{
- foreach (CompWindow *w, screen->windows ())
+ /* We traverse a copy of the list here because windows can be unhooked
+ * on state change rather than the delayed unhook that happens in <0.8.x
+ */
+
+ CompWindowList windows = screen->windows ();
+
+ foreach (CompWindow *w, windows)
{
WINRULES_WINDOW (w);
ww->updateState (num, updateStateMask);