From aedc03538d6e1dc36fff891831c0f5ad430fce11 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Sat, 31 Aug 2002 10:40:50 +0000
Subject: extra checking on transient

---
 src/Workspace.cc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/Workspace.cc b/src/Workspace.cc
index 341f569..531e7fb 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -22,7 +22,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: Workspace.cc,v 1.25 2002/08/18 23:35:31 fluxgen Exp $
+// $Id: Workspace.cc,v 1.26 2002/08/31 10:40:50 fluxgen Exp $
 
 #include "Workspace.hh"
 
@@ -221,15 +221,22 @@ void Workspace::raiseWindow(FluxboxWindow *w) {
 	FluxboxWindow *win = (FluxboxWindow *) 0, *bottom = w;
 
 	while (bottom->isTransient() && bottom->getTransientFor() &&
-			bottom->getTransientFor() != bottom) //prevent infinite loop
+			bottom->getTransientFor() != bottom) { //prevent infinite loop
+#ifdef DEBUG
+		assert(bottom != bottom->getTransientFor());		
+#endif // DEBUG
 		bottom = bottom->getTransientFor();
+		
+	}
 
 	int i = 1;
 	win = bottom;
 	while (win->hasTransient() && win->getTransient() &&
 			win->getTransient() != win) {//prevent infinite loop
+#ifdef DEBUG
+		assert(win != win->getTransient());
+#endif // DEBUG
 		win = win->getTransient();
-
 		i++;
 	}
 
@@ -237,7 +244,7 @@ void Workspace::raiseWindow(FluxboxWindow *w) {
 	Workspace *wkspc;
 
 	win = bottom;
-	while (True) {
+	while (1) {
 		*(curr++) = win->getFrameWindow();
 		screen->updateNetizenWindowRaise(win->getClientWindow());
 
-- 
cgit v0.11.2