summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/place.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-17 07:39:24 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-17 07:39:24 +0000
commit3d771006602840d730a3be0ef3c5c5e38de0ad5e (patch)
tree2989d723d6e169e203ea33cc62ec75b7745a360b /beryl-plugins/src/place.c
parent679f0c371471714ce25dbd7c92985889d0a46982 (diff)
downloadmarex-dev-3d771006602840d730a3be0ef3c5c5e38de0ad5e.tar.gz
marex-dev-3d771006602840d730a3be0ef3c5c5e38de0ad5e.tar.bz2
Don't place windows offscreen...
git-svn-id: file:///beryl/trunk@1821 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/place.c')
-rw-r--r--beryl-plugins/src/place.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/beryl-plugins/src/place.c b/beryl-plugins/src/place.c
index 2db754b..13ec7ba 100644
--- a/beryl-plugins/src/place.c
+++ b/beryl-plugins/src/place.c
@@ -563,9 +563,11 @@ static void placeIntelligent(CompWindow *w, int *x, int *y, GList *windows){
wRect.y=yi;
if (! rectangle_overlaps_some_window(&wRect,windows) ){
- *x=xi;
- *y=yi;
- return;
+ if ( !(xi+w->serverWidth > sRect.width) || !(yi + w->serverHeight > sRect.height) ){
+ *x=xi;
+ *y=yi;
+ return;
+ }
}
}
}