summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGodly T.Alias <godly.talias@samsung.com>2019-07-12 08:45:18 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-07-12 08:45:18 -0400
commitc001a8146bcc366780cd50fa51e8f91cfd2b1d5c (patch)
treedc301ad11ab86a674b05b459bdb7029edf393206
parent9c8a7bce24a831566be87fda152e43a03bf207a8 (diff)
Evas Events: Decrement grab count on freeze state
Summary: Decrement grab count of mouse event when mouse up happen during a freeze state. Currently as grab count is not reduced in this scenario, further touches gets ignored. Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in> Test Plan: (on scenario where proxy exists) mouse down -> freeze events -> mouse up -> unfreeze events Reviewers: cedric, raster, zmike, Hermet Reviewed By: zmike Subscribers: zmike, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9214
-rw-r--r--src/lib/evas/canvas/evas_events.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 83c1f2fcd7..5ffcd1f9a2 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -1851,6 +1851,38 @@ _canvas_event_feed_mouse_up_internal(Evas_Public_Data *e, Efl_Input_Pointer_Data
1851 _evas_event_source_mouse_up_events(eo_obj, eo_e, evt, pdata, event_id, cancel); 1851 _evas_event_source_mouse_up_events(eo_obj, eo_e, evt, pdata, event_id, cancel);
1852 if (e->delete_me) break; 1852 if (e->delete_me) break;
1853 } 1853 }
1854 else if (evas_event_freezes_through(eo_obj, obj) &&
1855 (obj->proxy->is_proxy) && (obj->proxy->src_events))
1856 {
1857 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
1858 Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS);
1859 Evas_Object_Protected_Data *child;
1860 Evas_Object *eo_child;
1861 Eina_List *copy_events;
1862
1863 if (src->delete_me) continue;
1864 copy_events = evas_event_list_copy(src->proxy->src_event_in);
1865 EINA_LIST_FREE(copy_events, eo_child)
1866 {
1867 Evas_Object_Pointer_Data *obj_pdata;
1868
1869 child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
1870 obj_pdata = _evas_object_pointer_data_get(pdata, child);
1871 if (!obj_pdata)
1872 {
1873 ERR("Could not find the object pointer data for device %p",
1874 ev->device);
1875 continue;
1876 }
1877 if (((obj_pdata->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
1878 (obj_pdata->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) &&
1879 (obj_pdata->mouse_grabbed > 0))
1880 {
1881 obj_pdata->mouse_grabbed--;
1882 pdata->seat->mouse_grabbed--;
1883 }
1884 }
1885 }
1854 if (pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 1886 if (pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
1855 { 1887 {
1856 if ((!cancel) && (pdata->seat->nogrep > 0)) pdata->seat->nogrep--; 1888 if ((!cancel) && (pdata->seat->nogrep > 0)) pdata->seat->nogrep--;