diff options
Diffstat (limited to 'src/Slit.cc')
-rw-r--r-- | src/Slit.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/Slit.cc b/src/Slit.cc index aa62997..8ad83dd 100644 --- a/src/Slit.cc +++ b/src/Slit.cc | |||
@@ -34,6 +34,7 @@ | |||
34 | #endif // HAVE_CONFIG_H | 34 | #endif // HAVE_CONFIG_H |
35 | 35 | ||
36 | #include "Screen.hh" | 36 | #include "Screen.hh" |
37 | #include "ScreenPlacement.hh" | ||
37 | #include "FbTk/ImageControl.hh" | 38 | #include "FbTk/ImageControl.hh" |
38 | #include "FbTk/RefCount.hh" | 39 | #include "FbTk/RefCount.hh" |
39 | #include "FbTk/EventManager.hh" | 40 | #include "FbTk/EventManager.hh" |
@@ -952,21 +953,8 @@ void Slit::buttonPressEvent(XButtonEvent &be) { | |||
952 | 953 | ||
953 | if (be.button == Button3) { | 954 | if (be.button == Button3) { |
954 | if (! m_slitmenu.isVisible()) { | 955 | if (! m_slitmenu.isVisible()) { |
955 | int head = screen().getHead(be.x_root, be.y_root); | 956 | screen().placementStrategy() |
956 | int borderw = m_slitmenu.fbwindow().borderWidth(); | 957 | .placeAndShowMenu(m_slitmenu, be.x_root, be.y_root, false); |
957 | pair<int, int> m = screen().clampToHead(head, | ||
958 | be.x_root - (m_slitmenu.width() / 2), | ||
959 | be.y_root - (m_slitmenu.titleWindow().height() / 2), | ||
960 | m_slitmenu.width() + 2*borderw, | ||
961 | m_slitmenu.height() + 2*borderw); | ||
962 | |||
963 | m_slitmenu.setScreen(screen().getHeadX(head), | ||
964 | screen().getHeadY(head), | ||
965 | screen().getHeadWidth(head), | ||
966 | screen().getHeadHeight(head)); | ||
967 | m_slitmenu.move(m.first, m.second); | ||
968 | m_slitmenu.show(); | ||
969 | m_slitmenu.grabInputFocus(); | ||
970 | } else | 958 | } else |
971 | m_slitmenu.hide(); | 959 | m_slitmenu.hide(); |
972 | } | 960 | } |