aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-22 09:34:02 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-22 09:34:02 (GMT)
commitf0e60d08652d7ae71f682714d772e3211e8e4133 (patch)
treee90e4985c151ac776d09bd34f5b1067ced58fd92
parent38a01a71b401800c8aa3b242f672cc58143f6c28 (diff)
downloadfluxbox_paul-f0e60d08652d7ae71f682714d772e3211e8e4133.zip
fluxbox_paul-f0e60d08652d7ae71f682714d772e3211e8e4133.tar.bz2
fix some issues with window menus
-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