From: Dana Jansens Date: Tue, 24 Apr 2007 15:32:04 +0000 (+0000) Subject: merge r5872,5873 from trunk X-Git-Tag: openbox-3_3_991-RELEASE~230 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=3faf70e5d834ea385d5da91928d47f1fdb077ef1;p=dana%2Fopenbox.git merge r5872,5873 from trunk --- diff --git a/openbox/client.c b/openbox/client.c index f5eccbc0..0ff67ac5 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -683,7 +683,7 @@ static ObAppSettings *client_get_settings_state(ObClient *self) if (settings->max_vert != -1) self->max_vert = !!settings->max_vert; if (settings->max_horz != -1) - self->max_vert = !!settings->max_horz; + self->max_horz = !!settings->max_horz; if (settings->fullscreen != -1) self->fullscreen = !!settings->fullscreen; @@ -1019,10 +1019,6 @@ static void client_get_desktop(ObClient *self) self->desktop = screen_desktop; } } - if (self->desktop != d) { - /* set the desktop hint, to make sure that it always exists */ - PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop); - } } static void client_get_layer(ObClient *self) @@ -2173,6 +2169,9 @@ static void client_apply_startup_state(ObClient *self, gint x, gint y) self->area.x = x; self->area.y = y; + /* set the desktop hint, to make sure that it always exists */ + PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop); + /* these are in a carefully crafted order.. */ if (self->iconic) { diff --git a/openbox/place.c b/openbox/place.c index 5614ecf3..74aa7605 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -126,9 +126,9 @@ static gboolean place_random(ObClient *client, gint *x, gint *y) b = areas[i]->y + areas[i]->height - client->frame->area.height; if (r > l) *x = g_random_int_range(l, r + 1); - else *x = 0; + else *x = areas[i]->x; if (b > t) *y = g_random_int_range(t, b + 1); - else *y = 0; + else *y = areas[i]->y; g_free(areas);