windows at positions x<0 or y<0 are no longer ignored in the placing code

This commit is contained in:
Dana Jansens 2002-05-02 04:44:19 +00:00
parent ba832151d0
commit 445e28af9a
2 changed files with 5 additions and 8 deletions

View 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 {

View 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)