From 4bd62b771c483144e939629cb95a4fafd5943b43 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck <mark@fluxbox.org> Date: Wed, 23 Jan 2008 00:27:53 -0800 Subject: fix some potential bugs with window menus --- src/Screen.cc | 4 ++++ 1 file changed, 4 insertions(+) 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) { } void BScreen::keyPressEvent(XKeyEvent &ke) { + WinClient *old = WindowCmd<void>::client(); WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, Keys::GLOBAL|Keys::ON_DESKTOP); + WindowCmd<void>::setClient(old); } void BScreen::keyReleaseEvent(XKeyEvent &ke) { @@ -833,9 +835,11 @@ void BScreen::buttonPressEvent(XButtonEvent &be) { imageControl().installRootColormap(); Keys *keys = Fluxbox::instance()->keys(); + WinClient *old = WindowCmd<void>::client(); WindowCmd<void>::setWindow(FocusControl::focusedFbWindow()); keys->doAction(be.type, be.state, be.button, Keys::GLOBAL|Keys::ON_DESKTOP, be.time); + WindowCmd<void>::setClient(old); } void BScreen::notifyUngrabKeyboard() { -- cgit v0.11.2