From: Junghoon Park Date: Thu, 3 Aug 2017 08:19:09 +0000 (+0900) Subject: Cancel mouse event when the widget is invisible X-Git-Tag: accepted/tizen/3.0/common/20170808.133304~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a952e6651bd2d9948e2d158342aa25d3034a9861;p=platform%2Fcore%2Fappfw%2Fscreen-connector.git Cancel mouse event when the widget is invisible - After wdiget is paused, the event for mouse events may be ignored - If mouse-up event is missed, a button will not be enabled again - To cover this issue, mouse-cancel event should be sent when the widget is paused Change-Id: Ife9eec5971dab78a949ab0826f91a902740365bc Signed-off-by: Junghoon Park --- diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 5349bf0..453b3da 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -59,7 +59,6 @@ struct _screen_connector_toolkit_evas_h { screen_connector_toolkit_h toolkit_h; int freeze; bool is_init; - bool cancel_touch; Evas_Object *img_tbm; Evas_Object *img_file; uint32_t img_type; @@ -384,6 +383,9 @@ static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visi return -1; if (__delayed_resuming_time == 0) { + if (obscured == TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_INVISIBLE) + tizen_remote_surface_transfer_touch_cancel(surface); + tizen_remote_surface_transfer_visibility(surface, obscured); return 0; @@ -394,6 +396,8 @@ static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visi g_source_remove(toolkit_evas_h->resuming_timer); toolkit_evas_h->resuming_timer = 0; } + + tizen_remote_surface_transfer_touch_cancel(surface); tizen_remote_surface_transfer_visibility(surface, obscured); } else { if (toolkit_evas_h->resuming_timer == 0) { @@ -1174,7 +1178,6 @@ EXPORT_API int screen_connector_toolkit_evas_send_touch_cancel(Evas_Object *obj) } tizen_remote_surface_transfer_touch_cancel(surface); - toolkit_evas_h->cancel_touch = true; } else { LOGE("surface not yet initialized."); return -1;