diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-04-10 19:59:24 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-06-26 14:16:04 (GMT) |
commit | 6201286cdfebfb3d4aab42d85cf53b94a3c95c5a (patch) | |
tree | 5f87a812dc725d2dda6b70d3a74a61dca7bbcc56 | |
parent | b9ed1c16de3cab491dc8a747bcf60a0b8ead7e91 (diff) | |
download | fluxbox-6201286cdfebfb3d4aab42d85cf53b94a3c95c5a.zip fluxbox-6201286cdfebfb3d4aab42d85cf53b94a3c95c5a.tar.bz2 |
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.
-rw-r--r-- | src/FbCommands.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 3201fc3..89b8eaf 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -82,8 +82,13 @@ void showMenu(BScreen &screen, FbTk::Menu &menu) { | |||
82 | screen.rootWindow().window(), &ignored.w, &ignored.w, | 82 | screen.rootWindow().window(), &ignored.w, &ignored.w, |
83 | &x, &y, &ignored.i, &ignored.i, &ignored.ui); | 83 | &x, &y, &ignored.i, &ignored.i, &ignored.ui); |
84 | 84 | ||
85 | screen.placementStrategy() | 85 | int head = screen.getHead(x, y); |
86 | .placeAndShowMenu(menu, x, y, false); | 86 | const bool mouseInStrut = y < static_cast<signed>(screen.maxTop(head)) || |
87 | y > static_cast<signed>(screen.maxBottom(head)) || | ||
88 | x < static_cast<signed>(screen.maxLeft(head)) || | ||
89 | x > static_cast<signed>(screen.maxRight(head)); | ||
90 | |||
91 | screen.placementStrategy().placeAndShowMenu(menu, x, y, mouseInStrut); | ||
87 | } | 92 | } |
88 | 93 | ||
89 | } | 94 | } |