summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc
index c32acbdf..07b99758 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1094,9 +1094,12 @@ void BlackboxWindow::getWMHints(void) {
// add window to the appropriate group
BWindowGroup *group = blackbox->searchGroup(client.window_group);
- if (! group) // no group found, create it!
- group = new BWindowGroup(blackbox, client.window_group);
- group->addWindow(this);
+ if (! group) { // no group found, create it!
+ new BWindowGroup(blackbox, client.window_group);
+ group = blackbox->searchGroup(client.window_group);
+ }
+ if (group)
+ group->addWindow(this);
}
client.wm_hint_flags = wmhint->flags;