]> Dogcows Code - chaz/openbox/commitdiff
allow you to force the position of windows with rc.xml's per-app settings with the...
authorDana Jansens <danakj@orodu.net>
Sat, 2 Feb 2008 21:50:55 +0000 (16:50 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 3 Feb 2008 23:37:37 +0000 (18:37 -0500)
openbox/config.c
openbox/config.h
openbox/place.c

index 69904d85d5b8cd9b5e39988e1fa9dc8f6cef55ea..99aa57f4773b0012174aca396ee5e91fcef7efac 100644 (file)
@@ -137,6 +137,7 @@ void config_app_settings_copy_non_defaults(const ObAppSettings *src,
 
     if (src->pos_given) {
         dst->pos_given = TRUE;
+        dst->pos_force = src->pos_force;
         dst->position = src->position;
         dst->monitor = src->monitor;
     }
@@ -246,6 +247,8 @@ static void parse_per_app_settings(ObParseInst *inst, xmlDocPtr doc,
                             settings->monitor = parse_int(doc, c) + 1;
                         g_free(s);
                     }
+
+                parse_attr_bool("force", n, &settings->pos_force);
             }
 
             if ((n = parse_find_node("focus", app->children)))
index 75275a8b675b323bba5948e34c70949d2131df37..23011a15f2006e463d821706a2567c190f90c758 100644 (file)
@@ -41,6 +41,7 @@ struct _ObAppSettings
 
     GravityPoint position;
     gboolean pos_given;
+    gboolean pos_force;
 
     guint desktop;
     gint shade;
index 81fb975272fe31e8f9ea677f6d25a84910cd809f..45d7f07ff72bb56b6ac1b613e98e5a0f279ae282 100644 (file)
@@ -489,8 +489,9 @@ gboolean place_client(ObClient *client, gint *x, gint *y,
     gboolean userplaced = FALSE;
 
     /* per-app settings override program specified position
-     * but not user specified */
-    if ((client->positioned & USPosition) ||
+     * but not user specified, unless pos_force is enabled */
+    if (((client->positioned & USPosition) &&
+         !(settings && settings->pos_given && settings->pos_force)) ||
         ((client->positioned & PPosition) &&
          !(settings && settings->pos_given)))
         return FALSE;
This page took 0.025937 seconds and 4 git commands to generate.