aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-24 10:21:16 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-24 10:21:16 (GMT)
commitf0ffaf890f65d9902ba23e2cd019de5ddba071c5 (patch)
treeecfbba4c6b1f60f5f3d259c8d9e2ef77ec261d54 /src/Slit.cc
parent49623390b623bcf4851e5cdd972e4c37d5103ecf (diff)
downloadfluxbox_pavel-f0ffaf890f65d9902ba23e2cd019de5ddba071c5.zip
fluxbox_pavel-f0ffaf890f65d9902ba23e2cd019de5ddba071c5.tar.bz2
moved Menu placement into ScreenPlacement::placeAndShowMenu()
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc18
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 }