From 2cac7ddf6fb0b3c937c4ea7b55b20960e362a360 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sat, 29 Mar 2008 17:15:37 +0100 Subject: 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. --- src/Toolbar.cc | 10 ++++++++-- 1 file 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) { } void Toolbar::leaveNotifyEvent(XCrossingEvent &event) { - // still inside? + + // in autoHide mode we'll receive a leaveNotifyEvent when activating + // the toolbar. so check if we are still inside the toolbar area. + // event.subwindow gets != None if we really left the window (eg the Slit + // was entered ontop of the toolbar) if (event.x_root > x() && event.x_root <= (int)(x() + width()) && - event.y_root > y() && event.y_root <= (int)(y() + height())) + event.y_root > y() && event.y_root <= (int)(y() + height()) && + event.subwindow == None ) { return; + } Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, Keys::ON_TOOLBAR); -- cgit v0.11.2