]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
cancel the interactive action only if runing another one. i think this will work?
[chaz/openbox] / openbox / place.c
index adbb1f4b7a54dfc3c2e99a1859588c293418dc3a..d290be3db2289805579a87a6c39f3020a0a6b23b 100644 (file)
@@ -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;
             }
 
@@ -469,7 +473,11 @@ gboolean place_client(ObClient *client, gint *x, gint *y,
 {
     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 */
@@ -482,7 +490,6 @@ gboolean place_client(ObClient *client, gint *x, gint *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;
 }
This page took 0.021608 seconds and 4 git commands to generate.