From c06971c162d947d212251b1d90a485638740e0c3 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 20 Jul 2007 16:13:15 -0400 Subject: [PATCH] don't crash from very short windows --- openbox/frame.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openbox/frame.c b/openbox/frame.c index 93dbefed..cefa389e 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -717,7 +717,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved, XUnmapWindow(ob_display, self->handle); } - if (self->bwidth && !self->max_horz) { + if (self->bwidth && !self->max_horz && + (self->client->area.height + self->size.top + + self->size.bottom) > ob_rr_theme->grip_width * 2) + { XMoveResizeWindow(ob_display, self->left, 0, self->bwidth + ob_rr_theme->grip_width, @@ -730,7 +733,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved, } else XUnmapWindow(ob_display, self->left); - if (self->bwidth && !self->max_horz) { + if (self->bwidth && !self->max_horz && + (self->client->area.height + self->size.top + + self->size.bottom) > ob_rr_theme->grip_width * 2) + { XMoveResizeWindow(ob_display, self->right, self->client->area.width + self->cbwidth_l + self->cbwidth_r + self->bwidth, -- 2.45.2