From: Dana Jansens Date: Sun, 6 May 2007 22:58:51 +0000 (+0000) Subject: missed some stuff? X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=2c507a72070c2eba4a7bfa743a2b6d330539711f;p=chaz%2Fopenbox missed some stuff? --- diff --git a/openbox/client.c b/openbox/client.c index 374ad404..f84291c1 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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; diff --git a/openbox/config.c b/openbox/config.c index d6adb975..18db15f8 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -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;