From 8f9163aaa11a202308efbe4bf5f14e4c041dacf4 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Fri, 9 Jun 2017 09:12:39 -0400 Subject: [PATCH] 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 --- 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 c8c8b6f..6548a0c 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 c150a4b..8c6ef6a 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 bc31963..26cdd7f 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; +} -- 2.7.4