From 445e28af9aeb385f5ec40213ea66b0a32c8a06ed Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 2 May 2002 04:44:19 +0000 Subject: [PATCH] windows at positions x<0 or y<0 are no longer ignored in the placing code --- src/Geometry.cc | 8 ++++---- src/Workspace.cc | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Geometry.cc b/src/Geometry.cc index db1de406..cdc39474 100644 --- a/src/Geometry.cc +++ b/src/Geometry.cc @@ -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 { diff --git a/src/Workspace.cc b/src/Workspace.cc index 38581d5a..a9fbcdb9 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -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) -- 2.45.2