X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=16c249378c3ec85de487e72b5b1c8b64e817bb25;hb=2e7359a2fd4fa7cad349651392348553c9623053;hp=c1df47865c547d987d4f35e2beedc87317bf155f;hpb=9011eb27e0b74828001c468538bfcbd815f99bdf;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index c1df4786..16c24937 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2367,9 +2367,12 @@ static ObStackingLayer calc_layer(ObClient *self) self->frame->size.bottom == 0 && self->frame->size.top == 0 && RECT_EQUAL(self->area, *screen_physical_area_monitor - (client_monitor(self)))))) && - (client_focused(self) || client_search_focus_tree(self))) - l = OB_STACKING_LAYER_FULLSCREEN; + (client_monitor(self))))))) { + if (client_focused(self) || client_search_focus_tree(self)) + l = OB_STACKING_LAYER_FULLSCREEN; + else + l = OB_STACKING_LAYER_FULLSCREEN_BELOW; + } else if (self->above) l = OB_STACKING_LAYER_ABOVE; else if (self->below) l = OB_STACKING_LAYER_BELOW; else l = OB_STACKING_LAYER_NORMAL; @@ -2814,7 +2817,6 @@ void client_fullscreen(ObClient *self, gboolean fs) self->fullscreen = fs; client_change_state(self); /* change the state hints on the client */ - client_calc_layer(self); /* and adjust out layer/stacking */ if (fs) { self->pre_fullscreen_area = self->area; @@ -2850,8 +2852,15 @@ void client_fullscreen(ObClient *self, gboolean fs) client_move_resize(self, x, y, w, h); - /* try focus us when we go into fullscreen mode */ - client_focus(self); + /* and adjust our layer/stacking. do this after resizing the window, + and applying decorations, because windows which fill the screen are + considered "fullscreen" and it affects their layer */ + client_calc_layer(self); + + if (fs) { + /* try focus us when we go into fullscreen mode */ + client_focus(self); + } } static void client_iconify_recursive(ObClient *self, @@ -3332,8 +3341,6 @@ ObClient *client_focus_target(ObClient *self) gboolean client_can_focus(ObClient *self) { - XEvent ev; - /* choose the correct target */ self = client_focus_target(self);