diff options
author | fluxgen <fluxgen> | 2003-12-20 19:05:42 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-20 19:05:42 (GMT) |
commit | 044aa68e34742dfda24450b5c7402f60ad921a62 (patch) | |
tree | 8dcd51cc91546345ac2874fcfeffa04cca5d0aa9 /src/Toolbar.cc | |
parent | b3723c2094de0b821de86775fce7932188400172 (diff) | |
download | fluxbox-044aa68e34742dfda24450b5c7402f60ad921a62.zip fluxbox-044aa68e34742dfda24450b5c7402f60ad921a62.tar.bz2 |
fixed autohide bug
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r-- | src/Toolbar.cc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 343d0a8..732be39 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.133 2003/12/19 03:57:40 fluxgen Exp $ | 25 | // $Id: Toolbar.cc,v 1.134 2003/12/20 19:05:42 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -353,7 +353,10 @@ void Toolbar::lower() { | |||
353 | 353 | ||
354 | void Toolbar::reconfigure() { | 354 | void Toolbar::reconfigure() { |
355 | updateVisibleState(); | 355 | updateVisibleState(); |
356 | 356 | ||
357 | if (!doAutoHide() && isHidden()) | ||
358 | toggleHidden(); | ||
359 | |||
357 | m_tool_factory.updateThemes(); | 360 | m_tool_factory.updateThemes(); |
358 | 361 | ||
359 | // parse resource tools and determine if we need to rebuild toolbar | 362 | // parse resource tools and determine if we need to rebuild toolbar |
@@ -501,10 +504,12 @@ void Toolbar::buttonReleaseEvent(XButtonEvent &re) { | |||
501 | screen().prevWorkspace(1); | 504 | screen().prevWorkspace(1); |
502 | } | 505 | } |
503 | 506 | ||
504 | |||
505 | void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) { | 507 | void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) { |
506 | if (! doAutoHide()) | 508 | if (! doAutoHide()) { |
509 | if (isHidden()) | ||
510 | toggleHidden(); | ||
507 | return; | 511 | return; |
512 | } | ||
508 | 513 | ||
509 | if (isHidden()) { | 514 | if (isHidden()) { |
510 | if (! m_hide_timer.isTiming()) | 515 | if (! m_hide_timer.isTiming()) |
@@ -515,9 +520,13 @@ void Toolbar::enterNotifyEvent(XCrossingEvent ¬_used) { | |||
515 | } | 520 | } |
516 | } | 521 | } |
517 | 522 | ||
518 | void Toolbar::leaveNotifyEvent(XCrossingEvent ¬_used) { | 523 | void Toolbar::leaveNotifyEvent(XCrossingEvent &event) { |
519 | if (! doAutoHide()) | 524 | if (! doAutoHide()) |
520 | return; | 525 | return; |
526 | // still inside? | ||
527 | if (event.x_root > x() && event.x_root <= (int)(x() + width()) && | ||
528 | event.y_root > y() && event.y_root <= (int)(y() + height())) | ||
529 | return; | ||
521 | 530 | ||
522 | if (isHidden()) { | 531 | if (isHidden()) { |
523 | if (m_hide_timer.isTiming()) | 532 | if (m_hide_timer.isTiming()) |
@@ -529,16 +538,13 @@ void Toolbar::leaveNotifyEvent(XCrossingEvent ¬_used) { | |||
529 | 538 | ||
530 | 539 | ||
531 | void Toolbar::exposeEvent(XExposeEvent &ee) { | 540 | void Toolbar::exposeEvent(XExposeEvent &ee) { |
532 | if (ee.window == frame.window) | 541 | if (ee.window == frame.window) { |
533 | frame.window.clearArea(ee.x, ee.y, | 542 | frame.window.clearArea(ee.x, ee.y, |
534 | ee.width, ee.height); | 543 | ee.width, ee.height); |
544 | } | ||
535 | } | 545 | } |
536 | 546 | ||
537 | 547 | ||
538 | void Toolbar::keyPressEvent(XKeyEvent &ke) { | ||
539 | |||
540 | } | ||
541 | |||
542 | void Toolbar::handleEvent(XEvent &event) { | 548 | void Toolbar::handleEvent(XEvent &event) { |
543 | if (event.type == ConfigureNotify && | 549 | if (event.type == ConfigureNotify && |
544 | event.xconfigure.window != window().window()) | 550 | event.xconfigure.window != window().window()) |
@@ -721,7 +727,7 @@ void Toolbar::updateVisibleState() { | |||
721 | } | 727 | } |
722 | 728 | ||
723 | void Toolbar::toggleHidden() { | 729 | void Toolbar::toggleHidden() { |
724 | m_hide_timer.fireOnce(true); | 730 | |
725 | 731 | ||
726 | // toggle hidden | 732 | // toggle hidden |
727 | m_hidden = ! m_hidden; | 733 | m_hidden = ! m_hidden; |