summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-09-10 11:03:58 (GMT)
committerfluxgen <fluxgen>2002-09-10 11:03:58 (GMT)
commit50c686fa22861dcfd0182747dd422fb40ec2afd2 (patch)
treec64b412a446bd358580de091667ada51a541ef85
parenta2f2b083f8254552713b0f31ced11f26c957a240 (diff)
downloadfluxbox_lack-50c686fa22861dcfd0182747dd422fb40ec2afd2.zip
fluxbox_lack-50c686fa22861dcfd0182747dd422fb40ec2afd2.tar.bz2
transient fixes
-rw-r--r--src/Workspace.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index d68e400..653907c 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Workspace.cc,v 1.28 2002/09/09 10:00:24 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.29 2002/09/10 11:03:58 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -237,8 +237,10 @@ void Workspace::removeAll(void) {
237void Workspace::raiseWindow(FluxboxWindow *w) { 237void Workspace::raiseWindow(FluxboxWindow *w) {
238 FluxboxWindow *win = w; 238 FluxboxWindow *win = w;
239 239
240 while (win->isTransient() && win->getTransientFor()) 240 while (win->getTransientFor()) {
241 win = win->getTransientFor(); 241 win = win->getTransientFor();
242 assert(win != win->getTransientFor());
243 }
242 244
243 int i = 1 + countTransients(*win); 245 int i = 1 + countTransients(*win);
244 246
@@ -262,12 +264,14 @@ void Workspace::raiseWindow(FluxboxWindow *w) {
262void Workspace::lowerWindow(FluxboxWindow *w) { 264void Workspace::lowerWindow(FluxboxWindow *w) {
263 FluxboxWindow *win = (FluxboxWindow *) 0, *bottom = w; 265 FluxboxWindow *win = (FluxboxWindow *) 0, *bottom = w;
264 266
265 while (bottom->isTransient() && bottom->getTransientFor() 267 while (bottom->getTransientFor()) {
266 && bottom->getTransientFor() != bottom) //prevent infinite loop
267 bottom = bottom->getTransientFor(); 268 bottom = bottom->getTransientFor();
269 assert(bottom != bottom->getTransientFor());
270 }
268 271
269 int i = 1 + countTransients(*w);
270 win = bottom; 272 win = bottom;
273 int i = 1 + countTransients(*win);
274
271 275
272 Stack st(i); 276 Stack st(i);
273 Stack::iterator stackit = st.begin(); 277 Stack::iterator stackit = st.begin();