all repos — openbox @ 445e28af9aeb385f5ec40213ea66b0a32c8a06ed

openbox fork - make it a bit more like ryudo

windows at positions x<0 or y<0 are no longer ignored in the placing code
Dana Jansens danakj@orodu.net
commit

445e28af9aeb385f5ec40213ea66b0a32c8a06ed

parent

ba832151d037225f086c8d7ff1de31f94c50cd09

2 files changed, 5 insertions(+), 8 deletions(-)

jump to
M src/Geometry.ccsrc/Geometry.cc

@@ -102,10 +102,10 @@ }

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 {
M src/Workspace.ccsrc/Workspace.cc

@@ -545,10 +545,7 @@ if(screen.rowPlacementDirection() == BScreen::LeftRight)

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)