all repos — fluxbox @ 6201286cdfebfb3d4aab42d85cf53b94a3c95c5a

custom fork of the fluxbox windowmanager

keep cmd menus off struts when the mouse is in it

the mouse is likely the trigger, so the popup would cover the
trigger item.
The present behavior of the iconbar suggests such behavior is
desired.
Thomas Lübking thomas.luebking@gmail.com
commit

6201286cdfebfb3d4aab42d85cf53b94a3c95c5a

parent

b9ed1c16de3cab491dc8a747bcf60a0b8ead7e91

1 files changed, 7 insertions(+), 2 deletions(-)

jump to
M src/FbCommands.ccsrc/FbCommands.cc

@@ -82,8 +82,13 @@ XQueryPointer(menu.fbwindow().display(),

screen.rootWindow().window(), &ignored.w, &ignored.w, &x, &y, &ignored.i, &ignored.i, &ignored.ui); - screen.placementStrategy() - .placeAndShowMenu(menu, x, y, false); + int head = screen.getHead(x, y); + const bool mouseInStrut = y < static_cast<signed>(screen.maxTop(head)) || + y > static_cast<signed>(screen.maxBottom(head)) || + x < static_cast<signed>(screen.maxLeft(head)) || + x > static_cast<signed>(screen.maxRight(head)); + + screen.placementStrategy().placeAndShowMenu(menu, x, y, mouseInStrut); } }