summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2020-10-10 14:41:01 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2020-10-10 14:41:01 +0200
commit4583cc9fda68858764f1d67ed34b25e012f43132 (patch)
tree8956d880bcf4e55925a0f8259267b78cb2f44b1e
parent8ef9a442144c1257078c0ed33019169b05062e76 (diff)
-rw-r--r--src/bin/e_shelf.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index 79b652567..2e4af4d2f 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -508,6 +508,8 @@ e_shelf_toggle(E_Shelf *es, int show)
508 E_OBJECT_CHECK(es); 508 E_OBJECT_CHECK(es);
509 E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE); 509 E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
510 510
511 printf("%p - %d - %p - %f %d %p %d %d\n", es, show, es->hide_animator, es->instant_delay, es->hidden, es->gadcon, es->gadcon->editing, es->cfg->autohide);
512
511 es->toggle = show; 513 es->toggle = show;
512 if (!es->hidden && _e_shelf_autohide_timer_extend(es)) return; 514 if (!es->hidden && _e_shelf_autohide_timer_extend(es)) return;
513 if (es->locked) return; 515 if (es->locked) return;
@@ -530,13 +532,22 @@ e_shelf_toggle(E_Shelf *es, int show)
530 { 532 {
531 ecore_timer_del(es->hide_timer); 533 ecore_timer_del(es->hide_timer);
532 es->hide_timer = NULL; 534 es->hide_timer = NULL;
535 return; //we should not add a animator here, the shelf cannot have moved yet.
533 } 536 }
537
534 if (!es->hide_animator) 538 if (!es->hide_animator)
535 { 539 {
536 es->hide_begin = ecore_loop_time_get(); 540 es->hide_begin = ecore_loop_time_get();
537 es->hide_animator = 541 es->hide_animator =
538 ecore_animator_add(_e_shelf_cb_hide_animator, es); 542 ecore_animator_add(_e_shelf_cb_hide_animator, es);
539 } 543 }
544 else
545 {
546 printf("HIT\n");
547 double time_elapsed = ecore_loop_time_get() - es->hide_begin;
548 es->hide_begin = ecore_loop_time_get() - (es->cfg->hide_duration - time_elapsed);
549 }
550
540 } 551 }
541 } 552 }
542 else if ((!show) && (!es->hidden) && ((!es->gadcon) || (!es->gadcon->editing)) && 553 else if ((!show) && (!es->hidden) && ((!es->gadcon) || (!es->gadcon->editing)) &&
@@ -2072,6 +2083,8 @@ _e_shelf_cb_hide_animator(void *data)
2072 int hide_max = 0; 2083 int hide_max = 0;
2073 double pos; 2084 double pos;
2074 2085
2086 printf("A\n");
2087
2075 es = data; 2088 es = data;
2076 if (!es->gadcon) 2089 if (!es->gadcon)
2077 { 2090 {
@@ -2118,7 +2131,7 @@ _e_shelf_cb_hide_animator(void *data)
2118 es->hide_step = hide_max * (1.0 - pos); 2131 es->hide_step = hide_max * (1.0 - pos);
2119 if (es->hide_step <= 0) es->hide_step = 0; 2132 if (es->hide_step <= 0) es->hide_step = 0;
2120 } 2133 }
2121 2134 printf("A -> %d\n", es->hide_step);
2122 switch (es->gadcon->orient) 2135 switch (es->gadcon->orient)
2123 { 2136 {
2124 case E_GADCON_ORIENT_TOP: 2137 case E_GADCON_ORIENT_TOP: