]> Dogcows Code - chaz/openbox/commitdiff
windows at positions x<0 or y<0 are no longer ignored in the placing code
authorDana Jansens <danakj@orodu.net>
Thu, 2 May 2002 04:44:19 +0000 (04:44 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 2 May 2002 04:44:19 +0000 (04:44 +0000)
src/Geometry.cc
src/Workspace.cc

index db1de4067015db4c69919065448f4a31d62fdf0e..cdc39474e88bac7f639f9c1e5d263fdff02fe430 100644 (file)
@@ -102,10 +102,10 @@ void Rect::setH(unsigned int h) {
 
 bool Rect::Intersect(const Rect &r) const {
   return
-    (x() < (r.x()+r.w()) ) &&
-    ( (x()+w()) > r.x()) &&
-    (y() < (r.y()+r.h()) ) &&
-    ( (y()+h()) > r.y());
+    (x() < (r.x()+(signed)r.w()) ) &&
+    ( (x()+(signed)w()) > r.x()) &&
+    (y() < (r.y()+(signed)r.h()) ) &&
+    ( (y()+(signed)h()) > r.y());
 }
 
 Rect Rect::Inflate(const unsigned int i) const {
index 38581d5a7cd691204b652d1a46ba53e9ef9729a6..a9fbcdb9937ca21c0fddb7ca95733748435054b6 100644 (file)
@@ -545,10 +545,7 @@ Point *Workspace::colSmartPlacement(const Size &win_size, const Rect &space) {
         sort(spaces.begin(),spaces.end(),colLRBT);
      else
         sort(spaces.begin(),spaces.end(),colRLBT);
-  fprintf(stderr,"Spaces after sorting\n");
-  for (siter=spaces.begin(); siter!=spaces.end(); ++siter)
-     fprintf(stderr,"space(%d,%d)(%d,%d)\n",siter->x(),siter->y(),
-             siter->x()+siter->w(),siter->y()+siter->h());
+
   //Find first space that fits the window
   best = NULL;
   for (siter=spaces.begin(); siter!=spaces.end(); ++siter)
This page took 0.026625 seconds and 4 git commands to generate.