summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2009-11-21 16:43:00 -0500
committerDana Jansens <danakj@orodu.net>2009-11-21 16:55:28 -0500
commitada5de28f71efaa5584709673cc49cdb3b703299 (patch)
tree1e0a68605a7cdb54a02657bb8df4f2e79c491fdc
parentac6cd2344f2afda023ac08017e0d2b19b0f66df8 (diff)
Don't ever give borders to windows that didnt have them before by making them "undecorated" with the keepborder config option on.
This fixes what commit 85f39cd27e7ea0eec8bc78f6139092b44fda2dad fixed for the fullscreen window case, but also fixes bug #4344.
-rw-r--r--openbox/client.c3
-rw-r--r--openbox/frame.c11
2 files changed, 7 insertions, 7 deletions
diff --git a/openbox/client.c b/openbox/client.c
index fe342f65..efb815e7 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1826,7 +1826,8 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig)
/* finally, the user can have requested no decorations, which overrides
everything (but doesnt give it a border if it doesnt have one) */
if (self->undecorated)
- self->decorations = 0;
+ self->decorations &= (config_theme_keepborder ?
+ OB_FRAME_DECOR_BORDER : 0);
/* if we don't have a titlebar, then we cannot shade! */
if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
diff --git a/openbox/frame.c b/openbox/frame.c
index e4a64bd3..c1b31570 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -340,14 +340,14 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
self->max_vert = self->client->max_vert;
self->shaded = self->client->shaded;
- if (self->decorations & OB_FRAME_DECOR_BORDER ||
- (self->client->undecorated && config_theme_keepborder
- && !self->client->fullscreen))
+ if (self->decorations & OB_FRAME_DECOR_BORDER)
self->bwidth = ob_rr_theme->fbwidth;
else
self->bwidth = 0;
- if (self->decorations & OB_FRAME_DECOR_BORDER) {
+ if (self->decorations & OB_FRAME_DECOR_BORDER &&
+ !self->client->undecorated)
+ {
self->cbwidth_l = self->cbwidth_r = ob_rr_theme->cbwidthx;
self->cbwidth_t = self->cbwidth_b = ob_rr_theme->cbwidthy;
} else
@@ -371,8 +371,7 @@ 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->max_horz || !self->max_vert ||
- !self->client->undecorated ? self->bwidth : 0),
+ (!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));