summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Toolbar.cc28
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
354void Toolbar::reconfigure() { 354void 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
505void Toolbar::enterNotifyEvent(XCrossingEvent &not_used) { 507void Toolbar::enterNotifyEvent(XCrossingEvent &not_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 &not_used) {
515 } 520 }
516} 521}
517 522
518void Toolbar::leaveNotifyEvent(XCrossingEvent &not_used) { 523void 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 &not_used) {
529 538
530 539
531void Toolbar::exposeEvent(XExposeEvent &ee) { 540void 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
538void Toolbar::keyPressEvent(XKeyEvent &ke) {
539
540}
541
542void Toolbar::handleEvent(XEvent &event) { 548void 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
723void Toolbar::toggleHidden() { 729void 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;