From 8e799bb47ddc6dcb1bc601dfc0bc44bcba2a7948 Mon Sep 17 00:00:00 2001 From: phillbush Date: Thu, 30 Jul 2020 17:24:58 -0300 Subject: [PATCH] Fixing y position of child menus. --- xmenu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xmenu.c b/xmenu.c index abbf240..e66ce27 100644 --- a/xmenu.c +++ b/xmenu.c @@ -755,10 +755,8 @@ setupmenupos(struct Menu *menu) else if (menu->parent->x > menu->w + config.border_pixels + config.gap_pixels) menu->x = menu->parent->x - menu->w - config.border_pixels - config.gap_pixels; - if (mon.y + mon.h - (menu->caller->y + menu->parent->y) > height) + if (mon.y + mon.h - (menu->caller->y + menu->parent->y) >= height) menu->y = menu->caller->y + menu->parent->y; - else if (mon.y + mon.h - menu->parent->y > height) - menu->y = menu->parent->y; else if (mon.y + mon.h > height) menu->y = mon.y + mon.h - height; }