aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 89ec898..2c7bde2 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -521,10 +521,15 @@ void Toolbar::reconfigure() {
521 521
522 522
523void Toolbar::buttonPressEvent(XButtonEvent &be) { 523void Toolbar::buttonPressEvent(XButtonEvent &be) {
524 WinClient *old = WindowCmd<void>::client();
524 WindowCmd<void>::setWindow(0); 525 WindowCmd<void>::setWindow(0);
525 if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button, 526 if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
526 Keys::ON_TOOLBAR, be.time)) 527 Keys::ON_TOOLBAR, be.time)) {
528 WindowCmd<void>::setClient(old);
527 return; 529 return;
530 }
531 WindowCmd<void>::setClient(old);
532
528 if (be.button == 1) 533 if (be.button == 1)
529 raise(); 534 raise();
530 if (be.button != 3) 535 if (be.button != 3)
@@ -549,9 +554,12 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
549} 554}
550 555
551void Toolbar::enterNotifyEvent(XCrossingEvent &ce) { 556void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
557 WinClient *old = WindowCmd<void>::client();
552 WindowCmd<void>::setWindow(0); 558 WindowCmd<void>::setWindow(0);
553 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0, 559 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0,
554 Keys::ON_TOOLBAR); 560 Keys::ON_TOOLBAR);
561 WindowCmd<void>::setClient(old);
562
555 if (! doAutoHide()) { 563 if (! doAutoHide()) {
556 if (isHidden()) 564 if (isHidden())
557 toggleHidden(); 565 toggleHidden();
@@ -573,8 +581,12 @@ void Toolbar::leaveNotifyEvent(XCrossingEvent &event) {
573 event.y_root > y() && event.y_root <= (int)(y() + height())) 581 event.y_root > y() && event.y_root <= (int)(y() + height()))
574 return; 582 return;
575 583
584 WinClient *old = WindowCmd<void>::client();
585 WindowCmd<void>::setWindow(0);
576 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, 586 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0,
577 Keys::ON_TOOLBAR); 587 Keys::ON_TOOLBAR);
588 WindowCmd<void>::setClient(old);
589
578 if (! doAutoHide()) 590 if (! doAutoHide())
579 return; 591 return;
580 592