fix some potential bugs with window menus

This commit is contained in:
Mark Tiefenbruck 2008-01-23 00:27:53 -08:00
parent d03edf2964
commit 4bd62b771c

View file

@ -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() {