don't crash from very short windows

This commit is contained in:
Dana Jansens 2007-07-20 16:13:15 -04:00
parent 1307fb6ca7
commit c06971c162

View file

@ -717,7 +717,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
XUnmapWindow(ob_display, self->handle); 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, XMoveResizeWindow(ob_display, self->left,
0, 0,
self->bwidth + ob_rr_theme->grip_width, self->bwidth + ob_rr_theme->grip_width,
@ -730,7 +733,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
} else } else
XUnmapWindow(ob_display, self->left); 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, XMoveResizeWindow(ob_display, self->right,
self->client->area.width + self->cbwidth_l + self->client->area.width + self->cbwidth_l +
self->cbwidth_r + self->bwidth, self->cbwidth_r + self->bwidth,