X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=3dbcf1265d6088acb5358d4877f072efb3ade53a;hb=db212a4f0149d26dd8f29150a41363b92c14ca4f;hp=db4b976d360c5ff0aafb8c8b19a5402b94032897;hpb=9c356d370ab3e5a6b28e38ce8289d80bf35c8828;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index db4b976d..3dbcf126 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -348,7 +348,8 @@ void frame_adjust_area(ObFrame *self, gboolean moved, self->shaded = self->client->shaded; if (self->decorations & OB_FRAME_DECOR_BORDER) - self->bwidth = ob_rr_theme->fbwidth; + self->bwidth = self->client->undecorated ? + ob_rr_theme->ubwidth : ob_rr_theme->fbwidth; else self->bwidth = 0; @@ -377,13 +378,21 @@ void frame_adjust_area(ObFrame *self, gboolean moved, STRUT_SET(self->size, self->cbwidth_l + (!self->max_horz ? self->bwidth : 0), - self->cbwidth_t + self->bwidth, + self->cbwidth_t + + (!self->max_horz || !self->max_vert ? self->bwidth : 0), self->cbwidth_r + (!self->max_horz ? self->bwidth : 0), self->cbwidth_b + (!self->max_horz || !self->max_vert ? self->bwidth : 0)); if (self->decorations & OB_FRAME_DECOR_TITLEBAR) self->size.top += ob_rr_theme->title_height + self->bwidth; + else if (self->max_horz && self->max_vert) { + /* A maximized and undecorated window needs a border on the + top of the window to let the user still undecorate/unmaximize the + window via the client menu. */ + self->size.top += self->bwidth; + } + if (self->decorations & OB_FRAME_DECOR_HANDLE && ob_rr_theme->handle_height > 0) { @@ -960,7 +969,7 @@ void frame_adjust_state(ObFrame *self) void frame_adjust_focus(ObFrame *self, gboolean hilite) { ob_debug_type(OB_DEBUG_FOCUS, - "Frame for 0x%x has focus: %d\n", + "Frame for 0x%x has focus: %d", self->client->window, hilite); self->focused = hilite; self->need_render = TRUE;