ecore-wl2: Add API to get if a window should ignore focus events
authorChris Michael <cp.michael@samsung.com>
Thu, 15 Jun 2017 14:35:45 +0000 (10:35 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 15 Jun 2017 14:35:45 +0000 (10:35 -0400)
Small patch to add an API function which can be used to find out if a
given window is set to skip focus events.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_window.c

index 0ab5b24..999d2da 100644 (file)
@@ -1194,6 +1194,18 @@ EAPI Ecore_Wl2_Display *ecore_wl2_window_display_get(const Ecore_Wl2_Window *win
 EAPI void ecore_wl2_window_focus_skip_set(Ecore_Wl2_Window *window, Eina_Bool focus_skip);
 
 /**
+ * Get if this window ignores focus requests
+ *
+ * @param window
+ *
+ * @return EINA_TRUE if a window should skip focus requests, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window);
+
+/**
  * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
  * @ingroup Ecore_Wl2_Group
  *
index ce081cd..97db1a3 100644 (file)
@@ -1462,3 +1462,10 @@ ecore_wl2_window_focus_skip_set(Ecore_Wl2_Window *window, Eina_Bool focus_skip)
    EINA_SAFETY_ON_NULL_RETURN(window);
    window->focus_skip = focus_skip;
 }
+
+EAPI Eina_Bool
+ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
+   return window->focus_skip;
+}