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.
This commit is contained in:
parent
b9ed1c16de
commit
6201286cdf
1 changed files with 7 additions and 2 deletions
|
@ -82,8 +82,13 @@ void showMenu(BScreen &screen, FbTk::Menu &menu) {
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue