raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=17553e2a3572d943ebe1a0aa72eba8ec29add857
commit 17553e2a3572d943ebe1a0aa72eba8ec29add857 Author: godly.talias <godly.tal...@samsung.com> Date: Wed Jan 13 15:59:15 2016 +0900 [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.tal...@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 --- data/themes/edc/elm/hover.edc | 58 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index 75ea813..cce316a 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -1,6 +1,9 @@ /* TODO: replicate diagonal swallow slots to the other hover styles */ group { name: "elm/hover/base/default"; data.item: "dismiss" "on"; + script { + public on_dismiss = 0; + } parts { part { name: "elm.swallow.offset"; type: SWALLOW; description { state: "default" 0.0; @@ -130,14 +133,22 @@ group { name: "elm/hover/base/default"; programs { program { name: "end"; signal: "mouse,up,*"; source: "base"; - action: SIGNAL_EMIT "elm,action,dismiss" "elm"; + script { + if (get_int(on_dismiss) == 0) { + emit("elm,action,dismiss", "elm"); + set_int(on_dismiss, 1); + } + } } program { name: "hide"; signal: "elm,action,hide"; source: "elm"; after: "hidefinished"; } program { name: "hidefinished"; - action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; + script { + set_int(on_dismiss, 0); + emit("elm,action,hide,finished", "elm"); + } } } } @@ -145,6 +156,9 @@ group { name: "elm/hover/base/default"; group { name: "elm/hover/base/popout"; data.item: "dismiss" "on"; images.image: "button_normal.png" COMP; + script { + public on_dismiss = 0; + } parts { part { name: "elm.swallow.offset"; type: SWALLOW; description { state: "default" 0.0; @@ -361,7 +375,12 @@ group { name: "elm/hover/base/popout"; programs { program { name: "end"; signal: "mouse,up,*"; source: "base"; - action: SIGNAL_EMIT "elm,action,dismiss" "elm"; + script { + if (get_int(on_dismiss) == 0) { + emit("elm,action,dismiss", "elm"); + set_int(on_dismiss, 1); + } + } } program { name: "show"; signal: "elm,action,show"; source: "elm"; @@ -376,7 +395,10 @@ group { name: "elm/hover/base/popout"; after: "hidefinished"; } program { name: "hidefinished"; - action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; + script { + set_int(on_dismiss, 0); + emit("elm,action,hide,finished", "elm"); + } } program { name: "leftshow"; signal: "elm,action,slot,left,show"; source: "elm"; @@ -450,6 +472,7 @@ group { name: "elm/hover/base/hoversel_vertical/default"; script { public visible = 0; public right = 0; + public on_dismiss = 0; public topshow2() { if (get_int(right) == 0) run_program(PROGRAM:"topshow_default"); @@ -644,7 +667,12 @@ group { name: "elm/hover/base/hoversel_vertical/default"; programs { program { name: "end"; signal: "mouse,up,*"; source: "base"; - action: SIGNAL_EMIT "elm,action,dismiss" "elm"; + script { + if (get_int(on_dismiss) == 0) { + emit("elm,action,dismiss", "elm"); + set_int(on_dismiss, 1); + } + } } program { name: "show"; signal: "elm,action,show"; source: "elm"; @@ -659,7 +687,10 @@ group { name: "elm/hover/base/hoversel_vertical/default"; after: "hidefinished"; } program { name: "hidefinished"; - action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; + script { + set_int(on_dismiss, 0); + emit("elm,action,hide,finished", "elm"); + } } program { name: "topshow"; signal: "elm,action,slot,top,show"; source: "elm"; @@ -779,6 +810,9 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; alias: "elm/hover/base/combobox_horizontal/entry"; images.image: "button_normal.png" COMP; data.item: "dismiss" "on"; + script { + public on_dismiss = 0; + } // max_size limits the maximum size of expanded hoversel // when it's scrollable. //data.item: "max_size" "120"; @@ -897,7 +931,12 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; programs { program { name: "end"; signal: "mouse,up,*"; source: "base"; - action: SIGNAL_EMIT "elm,action,dismiss" "elm"; + script { + if (get_int(on_dismiss) == 0) { + emit("elm,action,dismiss", "elm"); + set_int(on_dismiss, 1); + } + } } program { name: "show"; signal: "elm,action,show"; source: "elm"; @@ -913,7 +952,10 @@ group { name: "elm/hover/base/hoversel_horizontal/default"; after: "hidefinished"; } program { name: "hidefinished"; - action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; + script { + set_int(on_dismiss, 0); + emit("elm,action,hide,finished", "elm"); + } } program { name: "leftshow"; --