X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fclient.c;h=0ff67ac51fc2c970f64c29280378dbca3d3f0b1d;hb=d2f7ad9a2480c2810dee5def13cbdee36bd71e5e;hp=5eeda998d919443b028f7f356de38546950d11ba;hpb=ad852b6b56e43bdd7dda1389f54051cf92c0fad9;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 5eeda998..0ff67ac5 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -535,6 +535,9 @@ void client_unmanage(ObClient *self) /* update the focus lists */ focus_order_remove(self); + /* don't leave an invalid focus_client */ + if (self == focus_client) + focus_client = NULL; client_list = g_list_remove(client_list, self); stacking_remove(self); @@ -680,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; @@ -1016,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) @@ -1303,7 +1302,7 @@ void client_update_protocols(ObClient *self) self->focus_notify = TRUE; #ifdef SYNC else if (proto[i] == prop_atoms.net_wm_sync_request) - /* if this protocol is requested, then the resizing the + /* if this protocol is requested, then resizing the window will be synchronized between the frame and the client */ self->sync_request = TRUE; @@ -2170,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) {