summary refs log tree commit diff
path: root/menu.c
diff options
context:
space:
mode:
authorokan <okan>2014-01-03 14:23:50 +0000
committerokan <okan>2014-01-03 14:23:50 +0000
commitf4c289b9e63c3daec2b6523871e07328dc778bb6 (patch)
tree5f7a62e413a7e25a9662bf2e23c3b0bb151b3cbb /menu.c
parentb387351df1593020665df5e5ee5d86d16ad8b7d6 (diff)
parent08342471c86ca88dbfe71fffa55697f92378ff76 (diff)
downloadcwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.gz
cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.tar.xz
cwm-f4c289b9e63c3daec2b6523871e07328dc778bb6.zip
cvsimport
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 0a8984c..e243140 100644
--- a/menu.c
+++ b/menu.c
@@ -392,13 +392,13 @@ menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq)
 		mc->x = xine.w - mc->width;
 	if (mc->x < xine.x) {
 		mc->x = xine.x;
-		mc->width = xine.w - xine.x;
+		mc->width = MIN(mc->width, (xine.w - xine.x));
 	}
 	if (mc->y + mc->height >= xine.h)
 		mc->y = xine.h - mc->height;
 	if (mc->y < xine.y) {
 		mc->y = xine.y;
-		mc->height = xine.h - xine.y;
+		mc->height = MIN(mc->height, (xine.h - xine.y));
 	}
 
 	if (mc->x != xsave || mc->y != ysave)