aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/Window.cc b/src/Window.cc
index a6f3194..653032e 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -138,18 +138,18 @@ void raiseFluxboxWindow(FluxboxWindow &win) {
138 if (win.oplock) 138 if (win.oplock)
139 return; 139 return;
140 140
141 win.oplock = true; 141 if (win.isIconic())
142 return;
142 143
144 win.oplock = true;
143 145
144 // we need to lock actual restacking so that raising above active transient 146 // we need to lock actual restacking so that raising above active transient
145 // won't do anything nasty 147 // won't do anything nasty
146 if (!win.winClient().transientList().empty()) 148 if (!win.winClient().transientList().empty())
147 win.screen().layerManager().lock(); 149 win.screen().layerManager().lock();
148 150
149 if (!win.isIconic()) { 151 win.screen().updateNetizenWindowRaise(win.clientWindow());
150 win.screen().updateNetizenWindowRaise(win.clientWindow()); 152 win.layerItem().raise();
151 win.layerItem().raise();
152 }
153 153
154 // for each transient do raise 154 // for each transient do raise
155 155
@@ -174,6 +174,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) {
174 if (win.oplock) 174 if (win.oplock)
175 return; 175 return;
176 176
177 if (win.isIconic())
178 return;
179
177 win.oplock = true; 180 win.oplock = true;
178 181
179 // we need to lock actual restacking so that raising above active transient 182 // we need to lock actual restacking so that raising above active transient
@@ -181,18 +184,18 @@ void lowerFluxboxWindow(FluxboxWindow &win) {
181 if (!win.winClient().transientList().empty()) 184 if (!win.winClient().transientList().empty())
182 win.screen().layerManager().lock(); 185 win.screen().layerManager().lock();
183 186
184 if (!win.isIconic()) { 187 // lower the windows from the top down, so they don't change stacking order
185 win.screen().updateNetizenWindowLower(win.clientWindow()); 188 WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin();
186 win.layerItem().lower(); 189 WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend();
187 }
188
189 WinClient::TransientList::const_iterator it = win.winClient().transientList().begin();
190 WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end();
191 for (; it != it_end; ++it) { 190 for (; it != it_end; ++it) {
192 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) 191 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic())
193 // TODO: should we also check if it is the active client? 192 // TODO: should we also check if it is the active client?
194 lowerFluxboxWindow(*(*it)->fbwindow()); 193 lowerFluxboxWindow(*(*it)->fbwindow());
195 } 194 }
195
196 win.screen().updateNetizenWindowLower(win.clientWindow());
197 win.layerItem().lower();
198
196 win.oplock = false; 199 win.oplock = false;
197 if (!win.winClient().transientList().empty()) 200 if (!win.winClient().transientList().empty())
198 win.screen().layerManager().unlock(); 201 win.screen().layerManager().unlock();