diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc index 4c701a4..cf20503 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -138,17 +138,17 @@ 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.layerItem().raise(); |
150 | win.layerItem().raise(); | ||
151 | } | ||
152 | 152 | ||
153 | // for each transient do raise | 153 | // for each transient do raise |
154 | 154 | ||
@@ -173,6 +173,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) { | |||
173 | if (win.oplock) | 173 | if (win.oplock) |
174 | return; | 174 | return; |
175 | 175 | ||
176 | if (win.isIconic()) | ||
177 | return; | ||
178 | |||
176 | win.oplock = true; | 179 | win.oplock = true; |
177 | 180 | ||
178 | // we need to lock actual restacking so that raising above active transient | 181 | // we need to lock actual restacking so that raising above active transient |
@@ -180,17 +183,17 @@ void lowerFluxboxWindow(FluxboxWindow &win) { | |||
180 | if (!win.winClient().transientList().empty()) | 183 | if (!win.winClient().transientList().empty()) |
181 | win.screen().layerManager().lock(); | 184 | win.screen().layerManager().lock(); |
182 | 185 | ||
183 | if (!win.isIconic()) { | 186 | // lower the windows from the top down, so they don't change stacking order |
184 | win.layerItem().lower(); | 187 | WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin(); |
185 | } | 188 | WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend(); |
186 | |||
187 | WinClient::TransientList::const_iterator it = win.winClient().transientList().begin(); | ||
188 | WinClient::TransientList::const_iterator it_end = win.winClient().transientList().end(); | ||
189 | for (; it != it_end; ++it) { | 189 | for (; it != it_end; ++it) { |
190 | if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) | 190 | if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) |
191 | // TODO: should we also check if it is the active client? | 191 | // TODO: should we also check if it is the active client? |
192 | lowerFluxboxWindow(*(*it)->fbwindow()); | 192 | lowerFluxboxWindow(*(*it)->fbwindow()); |
193 | } | 193 | } |
194 | |||
195 | win.layerItem().lower(); | ||
196 | |||
194 | win.oplock = false; | 197 | win.oplock = false; |
195 | if (!win.winClient().transientList().empty()) | 198 | if (!win.winClient().transientList().empty()) |
196 | win.screen().layerManager().unlock(); | 199 | win.screen().layerManager().unlock(); |