Browse files

Fix window width/height going less than 1 on some platforms (bug #5246)

  • Loading branch information...
1 parent 9868ee2 commit fb2ce21385ea3cc088a8170cb7228140c38479f5 @danakj danakj committed Oct 16, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 openbox/client.c
View
7 openbox/client.c
@@ -2930,10 +2930,11 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
/* cap any X windows at the size of an unsigned short */
*w = MIN(*w,
- G_MAXUSHORT - self->frame->size.left - self->frame->size.right);
+ (gint)G_MAXUSHORT
+ - self->frame->size.left - self->frame->size.right);
*h = MIN(*h,
- G_MAXUSHORT - self->frame->size.top - self->frame->size.bottom);
-
+ (gint)G_MAXUSHORT
+ - self->frame->size.top - self->frame->size.bottom);
/* gets the frame's position */
frame_client_gravity(self->frame, x, y);

0 comments on commit fb2ce21

Please sign in to comment.