summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-19 21:03:51 +0000
committerDana Jansens <danakj@orodu.net>2007-05-19 21:03:51 +0000
commitecdb7d5807059405608629264e698b21b6222203 (patch)
treef48ffb31a145f28650e3ebf1f82e37851d7e44ee /openbox
parent83da4ec9398d197f39461cd7305163b2676840c8 (diff)
let you resize on the bottom of the frame when handle height is 0 in the theme
Diffstat (limited to 'openbox')
-rw-r--r--openbox/frame.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index f9c7e607..5ee05530 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -176,6 +176,14 @@ ObFrame *frame_new(ObClient *client)
static void set_theme_statics(ObFrame *self)
{
+ gint handle_height;
+
+ if (ob_rr_theme->handle_height > 0)
+ handle_height = ob_rr_theme->handle_height;
+ else
+ handle_height = 1;
+
+
/* set colors/appearance/sizes for stuff that doesn't change */
XResizeWindow(ob_display, self->max,
ob_rr_theme->button_size, ob_rr_theme->button_size);
@@ -189,12 +197,10 @@ static void set_theme_statics(ObFrame *self)
ob_rr_theme->button_size, ob_rr_theme->button_size);
XResizeWindow(ob_display, self->shade,
ob_rr_theme->button_size, ob_rr_theme->button_size);
- if (ob_rr_theme->handle_height > 0) {
- XResizeWindow(ob_display, self->lgrip,
- ob_rr_theme->grip_width, ob_rr_theme->handle_height);
- XResizeWindow(ob_display, self->rgrip,
- ob_rr_theme->grip_width, ob_rr_theme->handle_height);
- }
+ XResizeWindow(ob_display, self->lgrip,
+ ob_rr_theme->grip_width, handle_height);
+ XResizeWindow(ob_display, self->rgrip,
+ ob_rr_theme->grip_width, handle_height);
XResizeWindow(ob_display, self->tltresize,
ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1);
XResizeWindow(ob_display, self->trtresize,
@@ -406,12 +412,18 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
layout_title(self);
if (!fake) {
- if (self->decorations & OB_FRAME_DECOR_HANDLE &&
- ob_rr_theme->handle_height > 0)
+ if (self->decorations & OB_FRAME_DECOR_HANDLE)
{
+ gint handle_height;
+
+ if (ob_rr_theme->handle_height > 0)
+ handle_height = ob_rr_theme->handle_height;
+ else
+ handle_height = 1;
+
XMoveResizeWindow(ob_display, self->handle,
-self->bwidth, FRAME_HANDLE_Y(self),
- self->width, ob_rr_theme->handle_height);
+ self->width, handle_height);
XMapWindow(ob_display, self->handle);
if (self->decorations & OB_FRAME_DECOR_GRIPS) {