diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/Window.cc b/src/Window.cc index faf9dfc..133a84f 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1986,9 +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 | WindowCmd<void>::setClient(m_client); | ||
1990 | Fluxbox::instance()->keys()->doAction(focus ? FocusIn : FocusOut, 0, 0, | 1989 | Fluxbox::instance()->keys()->doAction(focus ? FocusIn : FocusOut, 0, 0, |
1991 | Keys::ON_WINDOW); | 1990 | Keys::ON_WINDOW, m_client); |
1992 | } | 1991 | } |
1993 | } | 1992 | } |
1994 | 1993 | ||
@@ -2166,7 +2165,7 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) { | |||
2166 | 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))) |
2167 | menu_x = screen().maxRight(head) - menu().width() - 1; | 2166 | menu_x = screen().maxRight(head) - menu().width() - 1; |
2168 | 2167 | ||
2169 | WindowCmd<void>::setWindow(this); | 2168 | FbMenu::setWindow(this); |
2170 | menu().move(menu_x, menu_y); | 2169 | menu().move(menu_x, menu_y); |
2171 | menu().show(); | 2170 | menu().show(); |
2172 | menu().raise(); | 2171 | menu().raise(); |
@@ -2180,7 +2179,7 @@ void FluxboxWindow::showMenu(int menu_x, int menu_y) { | |||
2180 | void FluxboxWindow::popupMenu() { | 2179 | void FluxboxWindow::popupMenu() { |
2181 | 2180 | ||
2182 | // hide menu if it was opened for this window before | 2181 | // hide menu if it was opened for this window before |
2183 | if (menu().isVisible() && WindowCmd<void>::window() == this) { | 2182 | if (menu().isVisible() && FbMenu::window() == this) { |
2184 | menu().hide(); | 2183 | menu().hide(); |
2185 | return; | 2184 | return; |
2186 | } | 2185 | } |
@@ -2637,11 +2636,11 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { | |||
2637 | raise(); | 2636 | raise(); |
2638 | 2637 | ||
2639 | // check keys file first | 2638 | // check keys file first |
2640 | WindowCmd<void>::setWindow(this); | ||
2641 | Keys *k = Fluxbox::instance()->keys(); | 2639 | Keys *k = Fluxbox::instance()->keys(); |
2642 | if (onTitlebar && k->doAction(be.type, be.state, be.button, | 2640 | if (onTitlebar && k->doAction(be.type, be.state, be.button, |
2643 | Keys::ON_TITLEBAR, be.time) || | 2641 | Keys::ON_TITLEBAR, m_client, be.time) || |
2644 | 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)) { | ||
2645 | return; | 2644 | return; |
2646 | } | 2645 | } |
2647 | 2646 | ||
@@ -2924,14 +2923,9 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { | |||
2924 | return; | 2923 | return; |
2925 | } | 2924 | } |
2926 | 2925 | ||
2927 | if (ev.window == frame().window()) { | 2926 | if (ev.window == frame().window()) |
2928 | // save old value, so we can restore it later | ||
2929 | WinClient *old = WindowCmd<void>::client(); | ||
2930 | WindowCmd<void>::setWindow(this); | ||
2931 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, | 2927 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, |
2932 | Keys::ON_WINDOW); | 2928 | Keys::ON_WINDOW, m_client); |
2933 | WindowCmd<void>::setClient(old); | ||
2934 | } | ||
2935 | 2929 | ||
2936 | WinClient *client = 0; | 2930 | WinClient *client = 0; |
2937 | if (screen().focusControl().isMouseTabFocus()) { | 2931 | if (screen().focusControl().isMouseTabFocus()) { |
@@ -2987,12 +2981,8 @@ void FluxboxWindow::leaveNotifyEvent(XCrossingEvent &ev) { | |||
2987 | ev.y_root <= (int)(frame().y() + frame().height())) | 2981 | ev.y_root <= (int)(frame().y() + frame().height())) |
2988 | return; | 2982 | return; |
2989 | 2983 | ||
2990 | // save old value, so we can restore it later | ||
2991 | WinClient *old = WindowCmd<void>::client(); | ||
2992 | WindowCmd<void>::setWindow(this); | ||
2993 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, | 2984 | Fluxbox::instance()->keys()->doAction(ev.type, ev.state, 0, |
2994 | Keys::ON_WINDOW); | 2985 | Keys::ON_WINDOW, m_client); |
2995 | WindowCmd<void>::setClient(old); | ||
2996 | 2986 | ||
2997 | // I hope commenting this out is right - simon 21jul2003 | 2987 | // I hope commenting this out is right - simon 21jul2003 |
2998 | //if (ev.window == frame().window()) | 2988 | //if (ev.window == frame().window()) |