devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8f9163aaa11a202308efbe4bf5f14e4c041dacf4

commit 8f9163aaa11a202308efbe4bf5f14e4c041dacf4
Author: Chris Michael <[email protected]>
Date:   Fri Jun 9 09:12:39 2017 -0400

    ecore-wl2: Add API function to set if wm rotation is supported
    
    Small patch to add an API function which can be called to set if
    window manager rotation is supported.
    
    @feature
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wl2/Ecore_Wl2.h         | 11 +++++++++++
 src/lib/ecore_wl2/ecore_wl2_private.h |  5 +++++
 src/lib/ecore_wl2/ecore_wl2_window.c  |  7 +++++++
 3 files changed, 23 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index c8c8b6f374..6548a0c84d 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -973,6 +973,17 @@ EAPI Ecore_Wl2_Output 
*ecore_wl2_window_output_find(Ecore_Wl2_Window *window);
 EAPI void ecore_wl2_window_buffer_transform_set(Ecore_Wl2_Window *window, int 
transform);
 
 /**
+ * Set if window rotation is supported by the window manager
+ *
+ * @param window
+ * @param enabled
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI void ecore_wl2_window_wm_rotation_supported_set(Ecore_Wl2_Window *window, 
Eina_Bool enabled);
+
+/**
  * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
  * @ingroup Ecore_Wl2_Group
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index c150a4b6ce..8c6ef6a6d0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -185,6 +185,11 @@ struct _Ecore_Wl2_Window
      {
         Eina_Bool configure : 1;
      } pending;
+
+   struct
+     {
+        Eina_Bool supported : 1;
+     } wm_rot;
 };
 
 struct _Ecore_Wl2_Output
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index bc319635f4..26cdd7fd4e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1213,3 +1213,10 @@ ecore_wl2_window_buffer_transform_set(Ecore_Wl2_Window 
*window, int transform)
 
    wl_surface_set_buffer_transform(window->surface, transform);
 }
+
+EAPI void
+ecore_wl2_window_wm_rotation_supported_set(Ecore_Wl2_Window *window, Eina_Bool 
enabled)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+   window->wm_rot.supported = enabled;
+}

-- 


Reply via email to