fix some issues with window menus
This commit is contained in:
parent
38a01a71b4
commit
f0e60d0865
1 changed files with 13 additions and 1 deletions
|
@ -521,10 +521,15 @@ void Toolbar::reconfigure() {
|
||||||
|
|
||||||
|
|
||||||
void Toolbar::buttonPressEvent(XButtonEvent &be) {
|
void Toolbar::buttonPressEvent(XButtonEvent &be) {
|
||||||
|
WinClient *old = WindowCmd<void>::client();
|
||||||
WindowCmd<void>::setWindow(0);
|
WindowCmd<void>::setWindow(0);
|
||||||
if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
|
if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
|
||||||
Keys::ON_TOOLBAR, be.time))
|
Keys::ON_TOOLBAR, be.time)) {
|
||||||
|
WindowCmd<void>::setClient(old);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
WindowCmd<void>::setClient(old);
|
||||||
|
|
||||||
if (be.button == 1)
|
if (be.button == 1)
|
||||||
raise();
|
raise();
|
||||||
if (be.button != 3)
|
if (be.button != 3)
|
||||||
|
@ -549,9 +554,12 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
|
void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
|
||||||
|
WinClient *old = WindowCmd<void>::client();
|
||||||
WindowCmd<void>::setWindow(0);
|
WindowCmd<void>::setWindow(0);
|
||||||
Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0,
|
Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0,
|
||||||
Keys::ON_TOOLBAR);
|
Keys::ON_TOOLBAR);
|
||||||
|
WindowCmd<void>::setClient(old);
|
||||||
|
|
||||||
if (! doAutoHide()) {
|
if (! doAutoHide()) {
|
||||||
if (isHidden())
|
if (isHidden())
|
||||||
toggleHidden();
|
toggleHidden();
|
||||||
|
@ -573,8 +581,12 @@ void Toolbar::leaveNotifyEvent(XCrossingEvent &event) {
|
||||||
event.y_root > y() && event.y_root <= (int)(y() + height()))
|
event.y_root > y() && event.y_root <= (int)(y() + height()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
WinClient *old = WindowCmd<void>::client();
|
||||||
|
WindowCmd<void>::setWindow(0);
|
||||||
Fluxbox::instance()->keys()->doAction(event.type, event.state, 0,
|
Fluxbox::instance()->keys()->doAction(event.type, event.state, 0,
|
||||||
Keys::ON_TOOLBAR);
|
Keys::ON_TOOLBAR);
|
||||||
|
WindowCmd<void>::setClient(old);
|
||||||
|
|
||||||
if (! doAutoHide())
|
if (! doAutoHide())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue