aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-03-29 16:15:37 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-03-29 16:15:37 (GMT)
commit2cac7ddf6fb0b3c937c4ea7b55b20960e362a360 (patch)
tree698a02489593060e97310461cb8a07a790e76ce4
parentd300c62ba090a3bfac65a2c8dcc7add1b4cf45b4 (diff)
downloadfluxbox-2cac7ddf6fb0b3c937c4ea7b55b20960e362a360.zip
fluxbox-2cac7ddf6fb0b3c937c4ea7b55b20960e362a360.tar.bz2
fixed a small issue with autohidden toolbar
the toolbar was not going to hidden state when the slit covered the toolbar and the mouse was still in the toolbar area. now we check event.subwindow to decide if it was a "valid" leaveNotifyEvent.
-rw-r--r--src/Toolbar.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 61402f1..26d87a8 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -567,10 +567,16 @@ void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
567} 567}
568 568
569void Toolbar::leaveNotifyEvent(XCrossingEvent &event) { 569void Toolbar::leaveNotifyEvent(XCrossingEvent &event) {
570 // still inside? 570
571 // in autoHide mode we'll receive a leaveNotifyEvent when activating
572 // the toolbar. so check if we are still inside the toolbar area.
573 // event.subwindow gets != None if we really left the window (eg the Slit
574 // was entered ontop of the toolbar)
571 if (event.x_root > x() && event.x_root <= (int)(x() + width()) && 575 if (event.x_root > x() && event.x_root <= (int)(x() + width()) &&
572 event.y_root > y() && event.y_root <= (int)(y() + height())) 576 event.y_root > y() && event.y_root <= (int)(y() + height()) &&
577 event.subwindow == None ) {
573 return; 578 return;
579 }
574 580
575 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, 581 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0,
576 Keys::ON_TOOLBAR); 582 Keys::ON_TOOLBAR);