]> Dogcows Code - chaz/openbox/commitdiff
missed some stuff?
authorDana Jansens <danakj@orodu.net>
Sun, 6 May 2007 22:58:51 +0000 (22:58 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 6 May 2007 22:58:51 +0000 (22:58 +0000)
openbox/client.c
openbox/config.c

index 374ad4042dedc4a0b8fcadecdc823a8d28743836..f84291c14e6fbc5dc87ce9d25b3cbf78ca19b9a8 100644 (file)
@@ -673,9 +673,13 @@ static ObAppSettings *client_get_settings_state(ObClient *self)
         if (settings->fullscreen != -1)
             self->fullscreen = !!settings->fullscreen;
 
-        if (settings->desktop < screen_num_desktops
-            || settings->desktop == DESKTOP_ALL)
-            self->desktop = settings->desktop;
+        if (settings->desktop) {
+            if (settings->desktop == DESKTOP_ALL)
+                self->desktop = settings->desktop;
+            else if (settings->desktop > 0 &&
+                     settings->desktop <= screen_num_desktops)
+                self->desktop = settings->desktop - 1;
+        }
 
         if (settings->layer == -1) {
             self->below = TRUE;
index d6adb9751331c7de6205ad7759ce8fabb2840976..18db15f837e2580b43d024b144f301a9591281c1 100644 (file)
@@ -215,6 +215,7 @@ static void parse_per_app_settings(ObParseInst *i, xmlDocPtr doc,
                         gint i = parse_int(doc, n);
                         if (i > 0)
                             settings->desktop = i;
+                    }
                     g_free(s);
                 } else
                     settings->desktop = 0;
This page took 0.026243 seconds and 4 git commands to generate.