aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index b5638b6..78c5a75 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -629,7 +629,7 @@ setup(int x, int y, int w) {
629 mw = w ? w : DisplayWidth(dpy, screen); 629 mw = w ? w : DisplayWidth(dpy, screen);
630 mh = dc.font.height + 2; 630 mh = dc.font.height + 2;
631 if(y < 0) { 631 if(y < 0) {
632 if(y == (int)(unsigned int)-1) 632 if(y == ((~(unsigned int)0)/2)+1)
633 y = DisplayHeight(dpy, screen) - mh; 633 y = DisplayHeight(dpy, screen) - mh;
634 else 634 else
635 y = (-1 * y) - mh; 635 y = (-1 * y) - mh;
@@ -709,7 +709,7 @@ main(int argc, char *argv[]) {
709 else if(!strcmp(argv[i], "-y")) { 709 else if(!strcmp(argv[i], "-y")) {
710 if(++i < argc) 710 if(++i < argc)
711 if(!strcmp(argv[i], "-0")) 711 if(!strcmp(argv[i], "-0"))
712 y = (int)(unsigned int)-1; 712 y = ((~(unsigned int)0)/2)+1;
713 else 713 else
714 y = atoi(argv[i]); 714 y = atoi(argv[i]);
715 } 715 }