summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-26 15:53:05 +0000
committerDana Jansens <danakj@orodu.net>2007-05-26 15:53:05 +0000
commit09f4483ce03ceb3830454f17d5610a2cb173057f (patch)
tree4392a4c1065b6a850a0e18e0a99fc2c59426d9d2 /openbox
parenta8fe821fddc2f30b4031bd9f9e854382a9f0b76e (diff)
fix titleleft and titleright for fullmax windows without decorations
Diffstat (limited to 'openbox')
-rw-r--r--openbox/frame.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 1ca7727f..09009e82 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -376,6 +376,13 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
if (!fake) {
if (self->bwidth) {
+ gint titlesides;
+
+ /* height of titleleft and titleright */
+ titlesides = (!self->max_horz ?
+ ob_rr_theme->grip_width :
+ self->size.top - self->bwidth);
+
XMoveResizeWindow(ob_display, self->titletop,
ob_rr_theme->grip_width + self->bwidth, 0,
/* width + bwidth*2 - bwidth*2 - grips*2 */
@@ -393,27 +400,29 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
ob_rr_theme->grip_width + self->bwidth,
self->bwidth);
- XMoveResizeWindow(ob_display, self->titleleft,
- 0, self->bwidth,
- self->bwidth,
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.top - self->bwidth));
- XMoveResizeWindow(ob_display, self->titleright,
- self->client->area.width +
- self->size.left + self->size.right -
- self->bwidth,
- self->bwidth,
- self->bwidth,
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.top - self->bwidth));
+ if (titlesides > 0) {
+ XMoveResizeWindow(ob_display, self->titleleft,
+ 0, self->bwidth,
+ self->bwidth,
+ titlesides);
+ XMoveResizeWindow(ob_display, self->titleright,
+ self->client->area.width +
+ self->size.left + self->size.right -
+ self->bwidth,
+ self->bwidth,
+ self->bwidth,
+ titlesides);
+
+ XMapWindow(ob_display, self->titleleft);
+ XMapWindow(ob_display, self->titleright);
+ } else {
+ XUnmapWindow(ob_display, self->titleleft);
+ XUnmapWindow(ob_display, self->titleright);
+ }
XMapWindow(ob_display, self->titletop);
XMapWindow(ob_display, self->titletopleft);
XMapWindow(ob_display, self->titletopright);
- XMapWindow(ob_display, self->titleleft);
- XMapWindow(ob_display, self->titleright);
if (self->decorations & OB_FRAME_DECOR_TITLEBAR &&
self->rbwidth)