diff options
Diffstat (limited to 'src')
-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 | } |