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;
}
{
gboolean ret;
- if (client->positioned)
+ /* per-app settings override program specified position
+ * but not user specified */
+ if ((client->positioned & USPosition) ||
+ ((client->positioned & PPosition) && !(settings && settings->pos_given))
+ )
return FALSE;
/* try a number of methods */
(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);
/* get where the client should be */
- frame_frame_gravity(client->frame, x, y,
- client->area.width, client->area.height);
+ frame_frame_gravity(client->frame, x, y);
return ret;
}