]> Dogcows Code - chaz/openbox/commitdiff
Fix per-app monitor setting
authorMikael Magnusson <mikachu@gmail.com>
Fri, 20 Feb 2009 16:41:34 +0000 (17:41 +0100)
committerMikael Magnusson <mikachu@gmail.com>
Fri, 20 Feb 2009 16:41:34 +0000 (17:41 +0100)
A couple of things were wrong, the parser added 1 to the value despite
expecting the user to give values in the range of 1 to
screen_num_monitors, rc.xml documented the values to start from 0 and
finally the monitor value wasn't copied over at all when matching the
client.

data/rc.xml
openbox/config.c

index 49700fb45616c9b1ef263137416dec05dc313df7..ebe2f310c923dd56a085b1ce12d226be15115e36 100644 (file)
       <y>200</y>
       <monitor>1</monitor>
       # specifies the monitor in a xinerama setup.
-      # 0 is the first head, or 'mouse' for wherever the mouse is
+      # 1 is the first head, or 'mouse' for wherever the mouse is
     </position>
 
     <focus>yes</focus>
index d27451788481a9a433503249c7032999fdff5fd1..96fdd0f4082b30df0338c21b5fb39d69d1a7ec89 100644 (file)
@@ -128,6 +128,7 @@ void config_app_settings_copy_non_defaults(const ObAppSettings *src,
     copy_if(type, (ObClientType)-1);
     copy_if(decor, -1);
     copy_if(shade, -1);
+    copy_if(monitor, -1);
     copy_if(focus, -1);
     copy_if(desktop, 0);
     copy_if(layer, -2);
@@ -267,7 +268,7 @@ static void parse_per_app_settings(ObParseInst *inst, xmlDocPtr doc,
                         if (!g_ascii_strcasecmp(s, "mouse"))
                             settings->monitor = 0;
                         else
-                            settings->monitor = parse_int(doc, c) + 1;
+                            settings->monitor = parse_int(doc, c);
                         g_free(s);
                     }
 
This page took 0.024076 seconds and 4 git commands to generate.