X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fclient.c;h=94b5c4800572850cd5c741e2b6819351f6a57e25;hb=c5508ec16f094847781188812784eb312d691401;hp=875c790bd8e727cc222b1796e2fef3add29718a5;hpb=119c48fc6c90da5ebb2fc59425bbdb30f4576e47;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 875c790b..94b5c480 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -649,6 +649,8 @@ void client_unmanage(ObClient *self) } self->fullscreen = self->max_horz = self->max_vert = FALSE; + /* let it be moved and resized no matter what */ + self->functions = OB_CLIENT_FUNC_MOVE | OB_CLIENT_FUNC_RESIZE; self->decorations = 0; /* unmanaged windows have no decor */ client_move_resize(self, a.x, a.y, a.width, a.height); @@ -1635,11 +1637,13 @@ void client_setup_decor_and_functions(ObClient *self) do with them is move them */ self->decorations = 0; self->functions = OB_CLIENT_FUNC_MOVE; + break; case OB_CLIENT_TYPE_DESKTOP: /* these windows are not manipulated by the window manager */ self->decorations = 0; self->functions = 0; + break; case OB_CLIENT_TYPE_DOCK: /* these windows are not manipulated by the window manager, but they @@ -1685,10 +1689,6 @@ void client_setup_decor_and_functions(ObClient *self) } } - /* can't resize maximized windows */ - if (self->max_horz && self->max_vert) - self->functions &=~ OB_CLIENT_FUNC_RESIZE; - if (!(self->functions & OB_CLIENT_FUNC_SHADE)) self->decorations &= ~OB_FRAME_DECOR_SHADE; if (!(self->functions & OB_CLIENT_FUNC_ICONIFY)) @@ -1704,6 +1704,15 @@ void client_setup_decor_and_functions(ObClient *self) self->decorations &= ~OB_FRAME_DECOR_MAXIMIZE; } + if (self->max_horz && self->max_vert) { + /* also can't resize maximized windows. + do this after checking for resize to let you maximize */ + self->functions &=~ OB_CLIENT_FUNC_RESIZE; + + /* kill the handle on fully maxed windows */ + self->decorations &= ~(OB_FRAME_DECOR_HANDLE | OB_FRAME_DECOR_GRIPS); + } + /* If there are no decorations to remove, don't allow the user to try toggle the state */ if (self->decorations == 0) @@ -3090,7 +3099,7 @@ void client_set_desktop_recursive(ObClient *self, guint old; GSList *it; - if (target != self->desktop) { + if (target != self->desktop && self->type != OB_CLIENT_TYPE_DESKTOP) { ob_debug("Setting desktop %u\n", target+1);