all repos — fluxbox @ 678703b08f12a0ce4d2c879c1f001d41b34932ec

custom fork of the fluxbox windowmanager

open slit menu properly wrt xinerama
markt markt
commit

678703b08f12a0ce4d2c879c1f001d41b34932ec

parent

226ec5d3715e7433fa1933e0507ae20d20f0453f

2 files changed, 17 insertions(+), 16 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0.0: *07/06/03: + * Submenus of slit menu were misbehaving with xinerama (Mark) + Slit.cc * Also send transient windows when sending a window to another workspace, bug #1716900 (Mark) Screen.cc
M src/Slit.ccsrc/Slit.cc

@@ -1010,26 +1010,25 @@ removeClient(event.xunmap.window);

} } -void Slit::buttonPressEvent(XButtonEvent &e) { - if (e.window != frame.window.window()) +void Slit::buttonPressEvent(XButtonEvent &be) { + if (be.window != frame.window.window()) return; - if (e.button == Button3) { + if (be.button == Button3) { if (! m_slitmenu.isVisible()) { - int x = e.x_root - (m_slitmenu.width() / 2), - y = e.y_root - (m_slitmenu.height() / 2); + int head = screen().getHead(be.x_root, be.y_root); + int borderw = m_slitmenu.fbwindow().borderWidth(); + pair<int, int> m = screen().clampToHead(head, + be.x_root - (m_slitmenu.width() / 2), + be.y_root - (m_slitmenu.titleWindow().height() / 2), + m_slitmenu.width() + 2*borderw, + m_slitmenu.height() + 2*borderw); - if (x < 0) - x = 0; - else if (x + m_slitmenu.width() > screen().width()) - x = screen().width() - m_slitmenu.width(); - - if (y < 0) - y = 0; - else if (y + m_slitmenu.height() > screen().height()) - y = screen().height() - m_slitmenu.height(); - - m_slitmenu.move(x, y); + m_slitmenu.setScreen(screen().getHeadX(head), + screen().getHeadY(head), + screen().getHeadWidth(head), + screen().getHeadHeight(head)); + m_slitmenu.move(m.first, m.second); m_slitmenu.show(); m_slitmenu.grabInputFocus(); } else