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
1 files changed,
7 insertions(+),
2 deletions(-)
jump to
M
src/FbCommands.cc
→
src/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); } }