Set event filter to ignore mouse move event 99/114499/1
authorDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 23 Jan 2017 05:12:12 +0000 (14:12 +0900)
committerDaehyeon Jung <darrenh.jung@samsung.com>
Mon, 13 Feb 2017 12:32:51 +0000 (21:32 +0900)
 - Some watch application creates bigger canvas than supported size,
 and it makes scrollable in the viewer-side.
 - The patch makes ignore mouse event to prevent scrolling of the
 watch application.

Change-Id: Iac1f282d880fe6f92ae766148fd5d0caa0ea6ed7
Signed-off-by: Daehyeon Jung <darrenh.jung@samsung.com>
src/watch_app_main.c

index ab94fca..be336c6 100755 (executable)
@@ -686,6 +686,7 @@ EXPORT_API int watch_app_get_elm_win(Evas_Object **win)
        Evas_Object *ret_win;
        struct wl_surface *surface;
        Ecore_Wl_Window *wl_win;
+       screen_connector_provider_h remote;
 
        if (win == NULL)
                return watch_app_error(APP_ERROR_INVALID_PARAMETER,
@@ -701,7 +702,11 @@ EXPORT_API int watch_app_get_elm_win(Evas_Object **win)
                _E("failed to get surface");
 
        surface = ecore_wl_window_surface_get(wl_win);
-       screen_connector_provider_remote_enable(watch_core_get_appid(), surface);
+       remote = screen_connector_provider_create(watch_core_get_appid(),
+                       surface);
+       screen_connector_provider_set_event_filter(remote,
+                       SCREEN_CONNECTOR_INPUT_TYPE_MOUSE_MOVE_X_Y |
+                       SCREEN_CONNECTOR_INPUT_TYPE_TOUCH_MOVE_X_Y);
 
        *win = ret_win;
        return APP_ERROR_NONE;