summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-02-11 18:17:45 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-02-11 18:17:45 (GMT)
commit611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2 (patch)
tree0d8edbf9e0356f7f93e87ca6970f684aabaae419 /src/Window.cc
parentcd128d7a3e19e0608b992d5211d7ea88a73ed3cd (diff)
downloadfluxbox_lack-611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2.zip
fluxbox_lack-611b6aa57e34ed8e52cb6b88c9adbafe4d67c6e2.tar.bz2
more fun with the window menu
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/Window.cc b/src/Window.cc
index d4e79b1..133a84f 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1986,11 +1986,8 @@ void FluxboxWindow::setFocusFlag(bool focus) {
1986 m_focussig.notify(); 1986 m_focussig.notify();
1987 if (m_client) 1987 if (m_client)
1988 m_client->focusSig().notify(); 1988 m_client->focusSig().notify();
1989 WinClient *old = WindowCmd<void>::client();
1990 WindowCmd<void>::setClient(m_client);
1991 Fluxbox::instance()->keys()->doAction(focus ? FocusIn : FocusOut, 0, 0, 1989 Fluxbox::instance()->keys()->doAction(focus ? FocusIn : FocusOut, 0, 0,
1992 Keys::ON_WINDOW); 1990 Keys::ON_WINDOW, m_client);
1993 WindowCmd<void>::setClient(old);
1994 } 1991 }
1995} 1992}
1996 1993
@@ -2168,7 +2165,7 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) {
2168 else if (menu_x + static_cast<signed>(menu().width()) >= static_cast<signed>(screen().maxRight(head))) 2165 else if (menu_x + static_cast<signed>(menu().width()) >= static_cast<signed>(screen().maxRight(head)))
2169 menu_x = screen().maxRight(head) - menu().width() - 1; 2166 menu_x = screen().maxRight(head) - menu().width() - 1;
2170 2167
2171 WindowCmd<void>::setWindow(this); 2168 FbMenu::setWindow(this);
2172 menu().move(menu_x, menu_y); 2169 menu().move(menu_x, menu_y);
2173 menu().show(); 2170 menu().show();
2174 menu().raise(); 2171 menu().raise();
@@ -2182,7 +2179,7 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) {
2182void FluxboxWindow::popupMenu() { 2179void FluxboxWindow::popupMenu() {
2183 2180
2184 // hide menu if it was opened for this window before 2181 // hide menu if it was opened for this window before
2185 if (menu().isVisible() && WindowCmd<void>::window() == this) { 2182 if (menu().isVisible() && FbMenu::window() == this) {
2186 menu().hide(); 2183 menu().hide();
2187 return; 2184 return;
2188 } 2185 }
@@ -2639,11 +2636,11 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2639 raise(); 2636 raise();
2640 2637
2641 // check keys file first 2638 // check keys file first
2642 WindowCmd<void>::setWindow(this);
2643 Keys *k = Fluxbox::instance()->keys(); 2639 Keys *k = Fluxbox::instance()->keys();
2644 if (onTitlebar && k->doAction(be.type, be.state, be.button, 2640 if (onTitlebar && k->doAction(be.type, be.state, be.button,
2645 Keys::ON_TITLEBAR, be.time) || 2641 Keys::ON_TITLEBAR, m_client, be.time) ||
2646 k->doAction(be.type, be.state, be.button, Keys::ON_WINDOW, be.time)) { 2642 k->doAction(be.type, be.state, be.button, Keys::ON_WINDOW, m_client,
2643 be.time)) {
2647 return; 2644 return;
2648 } 2645 }
2649 2646
@@ -2926,14 +2923,9 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2926 return; 2923 return;
2927 } 2924 }
2928 2925
2929 if (ev.window == frame().window()) { 2926 if (ev.window == frame().window())
2930 // save old value, so we can restore it later
2931 WinClient *old = WindowCmd<void>::client();
2932 WindowCmd<void>::setWindow(this);
2933 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, 2927 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0,
2934 Keys::ON_WINDOW); 2928 Keys::ON_WINDOW, m_client);
2935 WindowCmd<void>::setClient(old);
2936 }
2937 2929
2938 WinClient *client = 0; 2930 WinClient *client = 0;
2939 if (screen().focusControl().isMouseTabFocus()) { 2931 if (screen().focusControl().isMouseTabFocus()) {
@@ -2989,12 +2981,8 @@ void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) {
2989 ev.y_root <= (int)(frame().y() + frame().height())) 2981 ev.y_root <= (int)(frame().y() + frame().height()))
2990 return; 2982 return;
2991 2983
2992 // save old value, so we can restore it later
2993 WinClient *old = WindowCmd<void>::client();
2994 WindowCmd<void>::setWindow(this);
2995 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, 2984 Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0,
2996 Keys::ON_WINDOW); 2985 Keys::ON_WINDOW, m_client);
2997 WindowCmd<void>::setClient(old);
2998 2986
2999 // I hope commenting this out is right - simon 21jul2003 2987 // I hope commenting this out is right - simon 21jul2003
3000 //if (ev.window == frame().window()) 2988 //if (ev.window == frame().window())