Implementation 'focus_skip_set' request for wl_surface 94/40294/2
authorDuna Oh <duna.oh@samsung.com>
Tue, 2 Jun 2015 04:04:50 +0000 (13:04 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 2 Jun 2015 06:23:04 +0000 (23:23 -0700)
Change-Id: Ide885bcb2211d39a6b17459a5662026db185528f
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/lib/ecore_wayland/Ecore_Wayland.h
src/lib/ecore_wayland/ecore_wl_window.c
src/lib/ecore_wayland/tizen-policy-client-protocol.h
src/lib/ecore_wayland/tizen-policy-protocol.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c

index 3425199..dff3dfa 100644 (file)
@@ -637,6 +637,7 @@ EAPI void ecore_wl_window_cursor_from_name_set(Ecore_Wl_Window *win, const char
 EAPI void ecore_wl_window_cursor_default_restore(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent);
 EAPI void ecore_wl_window_position_set(Ecore_Wl_Window *win, int x, int y);
+EAPI void ecore_wl_window_focus_skip_set(Ecore_Wl_Window *win, Eina_Bool focus_skip);
 
 /**
  * Iconify a window
index 51d80a6..6656376 100644 (file)
@@ -822,6 +822,19 @@ ecore_wl_window_position_set(Ecore_Wl_Window *win, int x, int y)
      }
 }
 
+EAPI void
+ecore_wl_window_focus_skip_set(Ecore_Wl_Window *win, Eina_Bool focus_skip)
+{
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!win) return;
+   if (focus_skip)
+     {
+        if ((win->surface) && (_ecore_wl_disp->wl.tz_policy))
+          tizen_policy_focus_skip_set(_ecore_wl_disp->wl.tz_policy, win->surface);
+      }
+ }
+
 /* @since 1.12 */
 EAPI void 
 ecore_wl_window_iconified_set(Ecore_Wl_Window *win, Eina_Bool iconified)
index bf3f0d9..3308fec 100644 (file)
@@ -23,6 +23,7 @@ extern const struct wl_interface wl_surface_interface;
 #define TIZEN_POLICY_GET_VISIBILITY    0
 #define TIZEN_POLICY_ACTIVATE  1
 #define TIZEN_POLICY_POSITION_SET      2
+#define TIZEN_POLICY_FOCUS_SKIP_SET    3
 
 static inline void
 tizen_policy_set_user_data(struct tizen_policy *tizen_policy, void *user_data)
@@ -67,6 +68,13 @@ tizen_policy_position_set(struct tizen_policy *tizen_policy, struct wl_surface *
                         TIZEN_POLICY_POSITION_SET, surface, x, y);
 }
 
+static inline void
+tizen_policy_focus_skip_set(struct tizen_policy *tizen_policy, struct wl_surface *surface)
+{
+       wl_proxy_marshal((struct wl_proxy *) tizen_policy,
+                        TIZEN_POLICY_FOCUS_SKIP_SET, surface);
+}
+
 #ifndef TIZEN_VISIBILITY_VISIBILITY_ENUM
 #define TIZEN_VISIBILITY_VISIBILITY_ENUM
 enum tizen_visibility_visibility {
index 884754e..9b18210 100644 (file)
@@ -13,17 +13,19 @@ static const struct wl_interface *types[] = {
        &wl_surface_interface,
        NULL,
        NULL,
+       &wl_surface_interface,
 };
 
 static const struct wl_message tizen_policy_requests[] = {
        { "get_visibility", "no", types + 1 },
        { "activate", "o", types + 3 },
        { "position_set", "oii", types + 4 },
+       { "focus_skip_set", "o", types + 7 },
 };
 
 WL_EXPORT const struct wl_interface tizen_policy_interface = {
        "tizen_policy", 1,
-       3, tizen_policy_requests,
+       4, tizen_policy_requests,
        0, NULL,
 };
 
index 99adb03..845e469 100644 (file)
@@ -1383,6 +1383,19 @@ _ecore_evas_wl_common_ignore_events_set(Ecore_Evas *ee, int ignore)
    /* NB: Hmmm, may need to pass this to ecore_wl_window in the future */
 }
 
+void
+_ecore_evas_wl_common_focus_skip_set(Ecore_Evas *ee, Eina_Bool on)
+{
+   Ecore_Evas_Engine_Wl_Data *wdata;
+
+   wdata = ee->engine.data;
+
+   if (ee->prop.focus_skip == on) return;
+
+   ee->prop.focus_skip = on;
+   ecore_wl_window_focus_skip_set(wdata->win, on);
+}
+
 int
 _ecore_evas_wl_common_pre_render(Ecore_Evas *ee)
 {
index f87a6bb..a5f772b 100644 (file)
@@ -72,7 +72,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    NULL, // urgent set
    NULL, // modal set
    NULL, // demand attention set
-   NULL, // focus skip set
+   _ecore_evas_wl_common_focus_skip_set,
    NULL, // _ecore_evas_wl_common_render,
    _ecore_evas_wl_common_screen_geometry_get,
    _ecore_evas_wl_common_screen_dpi_get,
index 597c776..395a1e4 100644 (file)
@@ -70,6 +70,7 @@ void _ecore_evas_wl_common_iconified_set(Ecore_Evas *ee, Eina_Bool on);
 void _ecore_evas_wl_common_maximized_set(Ecore_Evas *ee, Eina_Bool on);
 void _ecore_evas_wl_common_fullscreen_set(Ecore_Evas *ee, Eina_Bool on);
 void _ecore_evas_wl_common_ignore_events_set(Ecore_Evas *ee, int ignore);
+void _ecore_evas_wl_common_focus_skip_set(Ecore_Evas *ee, Eina_Bool on);
 int  _ecore_evas_wl_common_pre_render(Ecore_Evas *ee);
 /* int  _ecore_evas_wl_common_render_updates(Ecore_Evas *ee); */
 void _ecore_evas_wl_common_post_render(Ecore_Evas *ee);
index 3736746..d0dc191 100644 (file)
@@ -72,7 +72,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    NULL, // urgent set
    NULL, // modal set
    NULL, // demand attention set
-   NULL, // focus skip set
+   _ecore_evas_wl_common_focus_skip_set,
    NULL, //_ecore_evas_wl_common_render,
    _ecore_evas_wl_common_screen_geometry_get,
    _ecore_evas_wl_common_screen_dpi_get,