fix #16
authorphillbush <phillbush@cock.li>
Sun, 18 Oct 2020 15:17:46 +0000 (12:17 -0300)
committerphillbush <phillbush@cock.li>
Sun, 18 Oct 2020 15:17:46 +0000 (12:17 -0300)
xmenu.c

diff --git a/xmenu.c b/xmenu.c
index 51412b3..3eab38d 100644 (file)
--- a/xmenu.c
+++ b/xmenu.c
@@ -628,12 +628,12 @@ setupmenupos(struct Menu *menu)
        width = menu->w + config.border_pixels * 2;
        height = menu->h + config.border_pixels * 2;
        if (menu->parent == NULL) { /* if root menu, calculate in respect to cursor */
        width = menu->w + config.border_pixels * 2;
        height = menu->h + config.border_pixels * 2;
        if (menu->parent == NULL) { /* if root menu, calculate in respect to cursor */
-               if (pflag || (config.posx > mon.x && mon.x + mon.w - config.posx >= width))
+               if (pflag || (config.posx >= mon.x && mon.x + mon.w - config.posx >= width))
                        menu->x = config.posx;
                else if (config.posx > width)
                        menu->x = config.posx - width;
 
                        menu->x = config.posx;
                else if (config.posx > width)
                        menu->x = config.posx - width;
 
-               if (pflag || (config.posy > mon.y && mon.y + mon.h - config.posy >= height))
+               if (pflag || (config.posy >= mon.y && mon.y + mon.h - config.posy >= height))
                        menu->y = config.posy;
                else if (mon.y + mon.h > height)
                        menu->y = mon.y + mon.h - height;
                        menu->y = config.posy;
                else if (mon.y + mon.h > height)
                        menu->y = mon.y + mon.h - height;