From e0e632dfdf9772363875a41dc330ab36366e1973 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Mon, 25 Sep 2000 09:23:04 +0000 Subject: [PATCH] Fixed a bug with window placement in smart mode where windows are to heigh. They get placed nicely now. svn path=/trunk/kdebase/kwin/; revision=65162 --- workspace.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 7795073a62..cfb6b9f14e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -14,7 +14,6 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include -#include #include #include @@ -1290,7 +1289,7 @@ void Workspace::smartPlacement(Client* c){ //loop over possible positions do { //test if enough room in x and y directions - if ( y + ch > maxRect.bottom() && ch <= maxRect.height() ) + if ( y + ch > maxRect.bottom() && ch <= maxRect.height()) overlap = h_wrong; // this throws the algorithm to an exit else if( x + cw > maxRect.right() ) overlap = w_wrong; @@ -1393,7 +1392,10 @@ void Workspace::smartPlacement(Client* c){ y = possible; } } - while( overlap != none && overlap != h_wrong ); + while( overlap != none && overlap != h_wrong && y< maxRect.bottom() ); + + if(ch>= maxRect.height() ) + y_optimal=maxRect.top(); // place the window c->move( x_optimal, y_optimal );