summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-15 05:05:58 +0000
committerDana Jansens <danakj@orodu.net>2003-09-15 05:05:58 +0000
commiteb7229603e1b873ea0f4763a5e36f8c4be9f381b (patch)
tree1adb21293d30fd3cfa139a50b8a3277e6e008c8d
parent52e75474336365d31d93ef348f0aa1515cdb7319 (diff)
no center in the first smart-place
-rw-r--r--openbox/place.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/openbox/place.c b/openbox/place.c
index 27df69f5..32d9fa32 100644
--- a/openbox/place.c
+++ b/openbox/place.c
@@ -162,8 +162,13 @@ static gboolean place_smart(ObClient *client, gint *x, gint *y,
if (r->width >= client->frame->area.width &&
r->height >= client->frame->area.height) {
ret = TRUE;
- *x = r->x + (r->width - client->frame->area.width) / 2;
- *y = r->y + (r->height - client->frame->area.height) / 2;
+ if (only_focused) {
+ *x = r->x + (r->width - client->frame->area.width) / 2;
+ *y = r->y + (r->height - client->frame->area.height) / 2;
+ } else {
+ *x = r->x;
+ *y = r->y;
+ }
}
}