diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-23 08:27:53 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-23 08:27:53 (GMT) |
commit | 4bd62b771c483144e939629cb95a4fafd5943b43 (patch) | |
tree | 0bb848c730f7897b53f04f8cc064edbbafa4de53 | |
parent | d03edf29641fa833aa636f2a195f3f810fa366c6 (diff) | |
download | fluxbox-4bd62b771c483144e939629cb95a4fafd5943b43.zip fluxbox-4bd62b771c483144e939629cb95a4fafd5943b43.tar.bz2 |
fix some potential bugs with window menus
-rw-r--r-- | src/Screen.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 9002ad2..e3b08c6 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -812,9 +812,11 @@ void BScreen::propertyNotify(Atom atom) { | |||
812 | } | 812 | } |
813 | 813 | ||
814 | void BScreen::keyPressEvent(XKeyEvent &ke) { | 814 | void BScreen::keyPressEvent(XKeyEvent &ke) { |
815 | WinClient *old = WindowCmd<void>::client(); | ||
815 | WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); | 816 | WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); |
816 | Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, | 817 | Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, |
817 | Keys::GLOBAL|Keys::ON_DESKTOP); | 818 | Keys::GLOBAL|Keys::ON_DESKTOP); |
819 | WindowCmd<void>::setClient(old); | ||
818 | } | 820 | } |
819 | 821 | ||
820 | void BScreen::keyReleaseEvent(XKeyEvent &ke) { | 822 | void BScreen::keyReleaseEvent(XKeyEvent &ke) { |
@@ -833,9 +835,11 @@ void BScreen::buttonPressEvent(XButtonEvent &be) { | |||
833 | imageControl().installRootColormap(); | 835 | imageControl().installRootColormap(); |
834 | 836 | ||
835 | Keys *keys = Fluxbox::instance()->keys(); | 837 | Keys *keys = Fluxbox::instance()->keys(); |
838 | WinClient *old = WindowCmd<void>::client(); | ||
836 | WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); | 839 | WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); |
837 | keys->doAction(be.type, be.state, be.button, Keys::GLOBAL|Keys::ON_DESKTOP, | 840 | keys->doAction(be.type, be.state, be.button, Keys::GLOBAL|Keys::ON_DESKTOP, |
838 | be.time); | 841 | be.time); |
842 | WindowCmd<void>::setClient(old); | ||
839 | } | 843 | } |
840 | 844 | ||
841 | void BScreen::notifyUngrabKeyboard() { | 845 | void BScreen::notifyUngrabKeyboard() { |