X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fplace.c;h=845becdb93d67fe74036f37757aa28de7c664458;hb=d945813e0856bdd8b06c1cc6d00e4cf33c9ee4cd;hp=6f7d490ddb79983f2622e9df3ee8392c8a5d257b;hpb=eb6a2e9c4b334f53d714a2e7f10f73c63c3d2edd;p=chaz%2Fopenbox diff --git a/openbox/place.c b/openbox/place.c index 6f7d490d..845becdb 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -326,8 +326,12 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) Rect *r = maxit->data; /* center it in the area */ - *x = r->x + (r->width - c->frame->area.width) / 2; - *y = r->y + (r->height - c->frame->area.height) / 2; + *x = r->x; + *y = r->y; + if (config_place_center) { + *x += (r->width - c->frame->area.width) / 2; + *y += (r->height - c->frame->area.height) / 2; + } ret = TRUE; } @@ -478,7 +482,6 @@ gboolean place_client(ObClient *client, gint *x, gint *y, (config_place_policy == OB_PLACE_POLICY_MOUSE && place_under_mouse(client, x, y)) || place_nooverlap(client, x, y) || - place_under_mouse(client, x, y) || place_random(client, x, y); g_assert(ret);