summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodly.talias <godly.talias@samsung.com>2016-01-13 15:59:15 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-01-13 15:59:15 +0900
commit17553e2a3572d943ebe1a0aa72eba8ec29add857 (patch)
tree8d007e28a85963df475e4c341276aee8c5bfb780
parent3b3091796c6faf62a68a16f7defeb3dae61dca26 (diff)
[Hover] Fixed the delaying of hover dismiss on continuous mouse clicks
Summary: When continous mouse clicks happen hover emits the hide signals continously to edje. As the embryo program for hiding requires some time to finish the animation, if within that time another mouse click comes the program gets invoked again and thus the hiding will get delayed till the mouse clicks ends. This patch fix that issue by adding a flag for emitting signals. @fix T3006 Signed-off-by: godly.talias <godly.talias@samsung.com> Test Plan: elementary_test Reviewers: cedric, conr2d, prince.dubey, shilpasingh, Princekrdubey Reviewed By: shilpasingh, Princekrdubey Subscribers: Princekrdubey, divyesh, govi, rajeshps Maniphest Tasks: T3006 Differential Revision: https://phab.enlightenment.org/D3526
-rw-r--r--data/themes/edc/elm/hover.edc58
1 files changed, 50 insertions, 8 deletions
diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc
index 75ea8138c..cce316aec 100644
--- a/data/themes/edc/elm/hover.edc
+++ b/data/themes/edc/elm/hover.edc
@@ -1,6 +1,9 @@
1/* TODO: replicate diagonal swallow slots to the other hover styles */ 1/* TODO: replicate diagonal swallow slots to the other hover styles */
2group { name: "elm/hover/base/default"; 2group { name: "elm/hover/base/default";
3 data.item: "dismiss" "on"; 3 data.item: "dismiss" "on";
4 script {
5 public on_dismiss = 0;
6 }
4 parts { 7 parts {
5 part { name: "elm.swallow.offset"; type: SWALLOW; 8 part { name: "elm.swallow.offset"; type: SWALLOW;
6 description { state: "default" 0.0; 9 description { state: "default" 0.0;
@@ -130,14 +133,22 @@ group { name: "elm/hover/base/default";
130 programs { 133 programs {
131 program { name: "end"; 134 program { name: "end";
132 signal: "mouse,up,*"; source: "base"; 135 signal: "mouse,up,*"; source: "base";
133 action: SIGNAL_EMIT "elm,action,dismiss" "elm"; 136 script {
137 if (get_int(on_dismiss) == 0) {
138 emit("elm,action,dismiss", "elm");
139 set_int(on_dismiss, 1);
140 }
141 }
134 } 142 }
135 program { name: "hide"; 143 program { name: "hide";
136 signal: "elm,action,hide"; source: "elm"; 144 signal: "elm,action,hide"; source: "elm";
137 after: "hidefinished"; 145 after: "hidefinished";
138 } 146 }
139 program { name: "hidefinished"; 147 program { name: "hidefinished";
140 action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; 148 script {
149 set_int(on_dismiss, 0);
150 emit("elm,action,hide,finished", "elm");
151 }
141 } 152 }
142 } 153 }
143} 154}
@@ -145,6 +156,9 @@ group { name: "elm/hover/base/default";
145group { name: "elm/hover/base/popout"; 156group { name: "elm/hover/base/popout";
146 data.item: "dismiss" "on"; 157 data.item: "dismiss" "on";
147 images.image: "button_normal.png" COMP; 158 images.image: "button_normal.png" COMP;
159 script {
160 public on_dismiss = 0;
161 }
148 parts { 162 parts {
149 part { name: "elm.swallow.offset"; type: SWALLOW; 163 part { name: "elm.swallow.offset"; type: SWALLOW;
150 description { state: "default" 0.0; 164 description { state: "default" 0.0;
@@ -361,7 +375,12 @@ group { name: "elm/hover/base/popout";
361 programs { 375 programs {
362 program { name: "end"; 376 program { name: "end";
363 signal: "mouse,up,*"; source: "base"; 377 signal: "mouse,up,*"; source: "base";
364 action: SIGNAL_EMIT "elm,action,dismiss" "elm"; 378 script {
379 if (get_int(on_dismiss) == 0) {
380 emit("elm,action,dismiss", "elm");
381 set_int(on_dismiss, 1);
382 }
383 }
365 } 384 }
366 program { name: "show"; 385 program { name: "show";
367 signal: "elm,action,show"; source: "elm"; 386 signal: "elm,action,show"; source: "elm";
@@ -376,7 +395,10 @@ group { name: "elm/hover/base/popout";
376 after: "hidefinished"; 395 after: "hidefinished";
377 } 396 }
378 program { name: "hidefinished"; 397 program { name: "hidefinished";
379 action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; 398 script {
399 set_int(on_dismiss, 0);
400 emit("elm,action,hide,finished", "elm");
401 }
380 } 402 }
381 program { name: "leftshow"; 403 program { name: "leftshow";
382 signal: "elm,action,slot,left,show"; source: "elm"; 404 signal: "elm,action,slot,left,show"; source: "elm";
@@ -450,6 +472,7 @@ group { name: "elm/hover/base/hoversel_vertical/default";
450 script { 472 script {
451 public visible = 0; 473 public visible = 0;
452 public right = 0; 474 public right = 0;
475 public on_dismiss = 0;
453 public topshow2() { 476 public topshow2() {
454 if (get_int(right) == 0) 477 if (get_int(right) == 0)
455 run_program(PROGRAM:"topshow_default"); 478 run_program(PROGRAM:"topshow_default");
@@ -644,7 +667,12 @@ group { name: "elm/hover/base/hoversel_vertical/default";
644 programs { 667 programs {
645 program { name: "end"; 668 program { name: "end";
646 signal: "mouse,up,*"; source: "base"; 669 signal: "mouse,up,*"; source: "base";
647 action: SIGNAL_EMIT "elm,action,dismiss" "elm"; 670 script {
671 if (get_int(on_dismiss) == 0) {
672 emit("elm,action,dismiss", "elm");
673 set_int(on_dismiss, 1);
674 }
675 }
648 } 676 }
649 program { name: "show"; 677 program { name: "show";
650 signal: "elm,action,show"; source: "elm"; 678 signal: "elm,action,show"; source: "elm";
@@ -659,7 +687,10 @@ group { name: "elm/hover/base/hoversel_vertical/default";
659 after: "hidefinished"; 687 after: "hidefinished";
660 } 688 }
661 program { name: "hidefinished"; 689 program { name: "hidefinished";
662 action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; 690 script {
691 set_int(on_dismiss, 0);
692 emit("elm,action,hide,finished", "elm");
693 }
663 } 694 }
664 program { name: "topshow"; 695 program { name: "topshow";
665 signal: "elm,action,slot,top,show"; source: "elm"; 696 signal: "elm,action,slot,top,show"; source: "elm";
@@ -779,6 +810,9 @@ group { name: "elm/hover/base/hoversel_horizontal/default";
779 alias: "elm/hover/base/combobox_horizontal/entry"; 810 alias: "elm/hover/base/combobox_horizontal/entry";
780 images.image: "button_normal.png" COMP; 811 images.image: "button_normal.png" COMP;
781 data.item: "dismiss" "on"; 812 data.item: "dismiss" "on";
813 script {
814 public on_dismiss = 0;
815 }
782 // max_size limits the maximum size of expanded hoversel 816 // max_size limits the maximum size of expanded hoversel
783 // when it's scrollable. 817 // when it's scrollable.
784 //data.item: "max_size" "120"; 818 //data.item: "max_size" "120";
@@ -897,7 +931,12 @@ group { name: "elm/hover/base/hoversel_horizontal/default";
897 programs { 931 programs {
898 program { name: "end"; 932 program { name: "end";
899 signal: "mouse,up,*"; source: "base"; 933 signal: "mouse,up,*"; source: "base";
900 action: SIGNAL_EMIT "elm,action,dismiss" "elm"; 934 script {
935 if (get_int(on_dismiss) == 0) {
936 emit("elm,action,dismiss", "elm");
937 set_int(on_dismiss, 1);
938 }
939 }
901 } 940 }
902 program { name: "show"; 941 program { name: "show";
903 signal: "elm,action,show"; source: "elm"; 942 signal: "elm,action,show"; source: "elm";
@@ -913,7 +952,10 @@ group { name: "elm/hover/base/hoversel_horizontal/default";
913 after: "hidefinished"; 952 after: "hidefinished";
914 } 953 }
915 program { name: "hidefinished"; 954 program { name: "hidefinished";
916 action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; 955 script {
956 set_int(on_dismiss, 0);
957 emit("elm,action,hide,finished", "elm");
958 }
917 } 959 }
918 960
919 program { name: "leftshow"; 961 program { name: "leftshow";