summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorGwanglim Lee <gl77.lee@samsung.com>2014-02-09 09:46:51 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-09 09:46:51 +0900
commit77092d94d457d35e11194e0b2ee2a2e9b90b38b9 (patch)
tree860f1b7c7e0e49ac61648471dd82ae09cf882b17 /src/lib
parent259f33679c38e03de3e35c3a0859b3f3f0f9c39a (diff)
ecore_evas: added window manager rotation to manage the rotation of windows by the WM.
Summary: The window manager rotation allows the WM to controls the rotation of application windows. It is designed to support synchronized rotation for the multiple application windows at same time. Reviewers: raster, seoz, cedric, Hermet Reviewed By: raster CC: cedric Differential Revision: https://phab.enlightenment.org/D529
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h81
-rw-r--r--src/lib/ecore_evas/ecore_evas.c152
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c10
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c10
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h20
-rw-r--r--src/lib/ecore_x/Ecore_X.h13
-rw-r--r--src/lib/ecore_x/Ecore_X_Atoms.h10
-rw-r--r--src/lib/ecore_x/ecore_x_atoms_decl.h21
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_e.c289
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_e.c278
10 files changed, 881 insertions, 3 deletions
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 3625316549..2ef08e50f3 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -684,6 +684,87 @@ EAPI void ecore_evas_window_available_profiles_set(Ecore_Evas *ee, const
684 */ 684 */
685EAPI Eina_Bool ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count); 685EAPI Eina_Bool ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count);
686/** 686/**
687 * @brief Query if the underlying windowing system supports the window manager rotation.
688 *
689 * @param ee The Ecore_Evas
690 * @return @c EINA_TRUE if the window manager rotation is supported, @c EINA_FALSE otherwise.
691 *
692 * @warning Support for this depends on the underlying windowing system.
693 * @since 1.9.0
694 */
695EAPI Eina_Bool ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee);
696/**
697 * @brief Set the preferred rotation hint.
698 *
699 * @param ee The Ecore_Evas to set
700 * @param rotation Value to set the preferred rotation hint
701 *
702 * @warning Support for this depends on the underlying windowing system.
703 * @since 1.9.0
704 */
705EAPI void ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation);
706/**
707 * @brief Get the preferred rotation hint.
708 *
709 * @param ee The Ecore_Evas to get the preferred rotation hint from.
710 * @return The preferred rotation hint, -1 on failure.
711 *
712 * @warning Support for this depends on the underlying windowing system.
713 * @since 1.9.0
714 */
715EAPI int ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee);
716/**
717 * @brief Set the array of available window rotations.
718 *
719 * @param ee The Ecore_Evas to set
720 * @param rotations The integer array of available window rotations
721 * @param count The number of members in rotations
722 *
723 * @warning Support for this depends on the underlying windowing system.
724 * @since 1.9.0
725 */
726EAPI void ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count);
727/**
728 * @brief Get the array of available window rotations.
729 *
730 * @param ee The Ecore_Evas to get available window rotations from.
731 * @param rotations Where to return the integer array of available window rotations
732 * @param count Where to return the number of members in rotations
733 * @return EINA_TRUE if available window rotations exist, EINA_FALSE otherwise
734 *
735 * @warning Support for this depends on the underlying windowing system.
736 * @since 1.9.0
737 */
738EAPI Eina_Bool ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count);
739/**
740 * @brief Set manual rotation done mode of Ecore_Evas's window
741 *
742 * @param ee The Ecore_Evas
743 * @param set If true, the window manager will not rotate the Ecore_Evas's window until
744 * the rotation done event is received by ecore_evas_wm_rotation_manual_rotation_done.
745 * If false, the manual rotation mode is disabled.
746 *
747 * @since 1.9.0
748 */
749EAPI void ecore_evas_wm_rotation_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set);
750/**
751 * @brief Get manual rotation done mode of Ecore_Evas's window
752 *
753 * @param ee The Ecore_Evas
754 * @return If true, the manual rotation done mode is enabled
755 *
756 * @since 1.9.0
757 */
758EAPI Eina_Bool ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Evas *ee);
759/**
760 * @brief Set rotation finish manually
761 *
762 * @param ee The Ecore_Evas
763 *
764 * @since 1.9.0
765 */
766EAPI void ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee);
767/**
687 * @brief Send message to parent ecore 768 * @brief Send message to parent ecore
688 * 769 *
689 * @param ee The Ecore_Evas to set 770 * @param ee The Ecore_Evas to set
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 37be5f8a76..43e4b8691f 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -1946,6 +1946,153 @@ ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsig
1946 return EINA_FALSE; 1946 return EINA_FALSE;
1947} 1947}
1948 1948
1949EAPI Eina_Bool
1950ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee)
1951{
1952 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
1953 {
1954 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
1955 "ecore_evas_wm_rotation_supported_get");
1956 return EINA_FALSE;
1957 }
1958 return ee->prop.wm_rot.supported;
1959}
1960
1961EAPI void
1962ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation)
1963{
1964 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
1965 {
1966 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
1967 "ecore_evas_wm_rotation_preferred_rotation_set");
1968 return;
1969 }
1970 if (rotation != -1)
1971 {
1972 if (ee->prop.wm_rot.available_rots)
1973 {
1974 Eina_Bool found = EINA_FALSE;
1975 unsigned int i;
1976 for (i = 0; i < ee->prop.wm_rot.count; i++)
1977 {
1978 if (ee->prop.wm_rot.available_rots[i] == rotation)
1979 {
1980 found = EINA_TRUE;
1981 break;
1982 }
1983 }
1984 if (!found) return;
1985 }
1986 }
1987 IFC(ee, fn_wm_rot_preferred_rotation_set) (ee, rotation);
1988 IFE;
1989}
1990
1991EAPI int
1992ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee)
1993{
1994 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
1995 {
1996 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
1997 "ecore_evas_wm_rotation_preferred_rotation_get");
1998 return -1;
1999 }
2000 return ee->prop.wm_rot.preferred_rot;
2001}
2002
2003EAPI void
2004ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count)
2005{
2006 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2007 {
2008 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2009 "ecore_evas_wm_rotation_available_rotations_set");
2010 return;
2011 }
2012 IFC(ee, fn_wm_rot_available_rotations_set) (ee, rotations, count);
2013 IFE;
2014}
2015
2016EAPI Eina_Bool
2017ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count)
2018{
2019 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2020 {
2021 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2022 "ecore_evas_wm_rotation_available_rotations_get");
2023 return EINA_FALSE;
2024 }
2025 if ((!rotations) || (!count))
2026 return EINA_FALSE;
2027
2028 if ((!ee->prop.wm_rot.available_rots) || (ee->prop.wm_rot.count == 0))
2029 return EINA_FALSE;
2030
2031 *rotations = calloc(ee->prop.wm_rot.count, sizeof(int));
2032 if (!*rotations) return EINA_FALSE;
2033
2034 memcpy(*rotations, ee->prop.wm_rot.available_rots, sizeof(int) * ee->prop.wm_rot.count);
2035 *count = ee->prop.wm_rot.count;
2036
2037 return EINA_TRUE;
2038}
2039
2040EAPI void
2041ecore_evas_wm_rotation_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set)
2042{
2043 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2044 {
2045 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2046 "ecore_evas_wm_rotation_manual_rotation_done_set");
2047 return;
2048 }
2049
2050 if (!ee->prop.wm_rot.app_set)
2051 {
2052 return;
2053 }
2054
2055 IFC(ee, fn_wm_rot_manual_rotation_done_set) (ee, set);
2056 IFE;
2057}
2058
2059EAPI Eina_Bool
2060ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Evas *ee)
2061{
2062 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2063 {
2064 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2065 "ecore_evas_wm_rotation_manual_rotation_done_get");
2066 return EINA_FALSE;
2067 }
2068
2069 if (!ee->prop.wm_rot.app_set)
2070 {
2071 return EINA_FALSE;
2072 }
2073
2074 return ee->prop.wm_rot.manual_mode.set;
2075}
2076
2077EAPI void
2078ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee)
2079{
2080 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2081 {
2082 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2083 "ecore_evas_wm_rotation_manual_rotation_done");
2084 return;
2085 }
2086
2087 if (!ee->prop.wm_rot.app_set)
2088 {
2089 return;
2090 }
2091
2092 IFC(ee, fn_wm_rot_manual_rotation_done) (ee);
2093 IFE;
2094}
2095
1949EAPI void 2096EAPI void
1950ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on) 2097ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
1951{ 2098{
@@ -2703,6 +2850,11 @@ _ecore_evas_free(Ecore_Evas *ee)
2703 ee->prop.profile.name = NULL; 2850 ee->prop.profile.name = NULL;
2704 _ecore_evas_window_available_profiles_free(ee); 2851 _ecore_evas_window_available_profiles_free(ee);
2705 ee->prop.profile.available_list = NULL; 2852 ee->prop.profile.available_list = NULL;
2853 if (ee->prop.wm_rot.available_rots) free(ee->prop.wm_rot.available_rots);
2854 ee->prop.wm_rot.available_rots = NULL;
2855 if (ee->prop.wm_rot.manual_mode.timer)
2856 ecore_timer_del(ee->prop.wm_rot.manual_mode.timer);
2857 ee->prop.wm_rot.manual_mode.timer = NULL;
2706 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); 2858 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
2707 ee->prop.cursor.object = NULL; 2859 ee->prop.cursor.object = NULL;
2708 if (ee->evas) evas_free(ee->evas); 2860 if (ee->evas) evas_free(ee->evas);
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 0b9e124ac5..5c4a739ba7 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -581,7 +581,15 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
581 NULL, // screen_geometry_get 581 NULL, // screen_geometry_get
582 NULL, // screen_dpi_get 582 NULL, // screen_dpi_get
583 _ecore_evas_buffer_msg_parent_send, 583 _ecore_evas_buffer_msg_parent_send,
584 _ecore_evas_buffer_msg_send 584 _ecore_evas_buffer_msg_send,
585
586 NULL, // pointer_xy_get
587 NULL, // pointer_warp
588
589 NULL, // wm_rot_preferred_rotation_set
590 NULL, // wm_rot_available_rotations_set
591 NULL, // wm_rot_manual_rotation_done_set
592 NULL // wm_rot_manual_rotation_done
585}; 593};
586 594
587static void * 595static void *
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index 9aa1dba319..84c9a0f495 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -698,7 +698,15 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
698 _ecore_evas_ews_screen_geometry_get, 698 _ecore_evas_ews_screen_geometry_get,
699 NULL, // screen_dpi_get 699 NULL, // screen_dpi_get
700 NULL, 700 NULL,
701 NULL // msg_send 701 NULL, // msg_send
702
703 NULL, // pointer_xy_get
704 NULL, // pointer_warp
705
706 NULL, // wm_rot_preferred_rotation_set
707 NULL, // wm_rot_available_rotations_set
708 NULL, // wm_rot_manual_rotation_done_set
709 NULL // wm_rot_manual_rotation_done
702}; 710};
703 711
704void 712void
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index ca7a801a13..cc514d5d8e 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -115,6 +115,11 @@ struct _Ecore_Evas_Engine_Func
115 /* 1.8 abstractions */ 115 /* 1.8 abstractions */
116 void (*fn_pointer_xy_get) (const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y); 116 void (*fn_pointer_xy_get) (const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y);
117 Eina_Bool (*fn_pointer_warp) (const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y); 117 Eina_Bool (*fn_pointer_warp) (const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y);
118
119 void (*fn_wm_rot_preferred_rotation_set) (Ecore_Evas *ee, int rot);
120 void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count);
121 void (*fn_wm_rot_manual_rotation_done_set) (Ecore_Evas *ee, Eina_Bool set);
122 void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee);
118}; 123};
119 124
120struct _Ecore_Evas_Interface 125struct _Ecore_Evas_Interface
@@ -186,6 +191,21 @@ struct _Ecore_Evas
186 int x, y; 191 int x, y;
187 } hot; 192 } hot;
188 } cursor; 193 } cursor;
194 struct {
195 Eina_Bool supported; // indicate that the underlying window system supports window manager rotation protocol
196 Eina_Bool app_set; // indicate that the ee supports window manager rotation protocol
197 Eina_Bool win_resize; // indicate that the ee will be resized by the WM
198 int angle; // rotation value which is decided by the WM
199 int w, h; // window size to rotate
200 int preferred_rot; // preferred rotation hint
201 int *available_rots; // array of avaialable rotation values
202 unsigned int count; // number of elements of available_rots
203 struct {
204 Eina_Bool set;
205 Eina_Bool wait_for_done;
206 Ecore_Timer *timer;
207 } manual_mode;
208 } wm_rot;
189 int layer; 209 int layer;
190 Ecore_Window window; 210 Ecore_Window window;
191 unsigned char avoid_damage; 211 unsigned char avoid_damage;
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index 71b7a73859..0d042791d4 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -2677,6 +2677,19 @@ EAPI void ecore_x_e_illume_window_state_send(Ec
2677 2677
2678EAPI void ecore_x_xkb_select_group(int group); /* @since 1.7 */ 2678EAPI void ecore_x_xkb_select_group(int group); /* @since 1.7 */
2679 2679
2680EAPI void ecore_x_e_window_rotation_supported_set(Ecore_X_Window root, Eina_Bool enabled); /**< @since 1.9 */
2681EAPI Eina_Bool ecore_x_e_window_rotation_supported_get(Ecore_X_Window root); /**< @since 1.9 */
2682EAPI void ecore_x_e_window_rotation_app_set(Ecore_X_Window win, Eina_Bool set); /**< @since 1.9 */
2683EAPI Eina_Bool ecore_x_e_window_rotation_app_get(Ecore_X_Window win); /**< @since 1.9 */
2684EAPI void ecore_x_e_window_rotation_preferred_rotation_set(Ecore_X_Window win, int rot); /**< @since 1.9 */
2685EAPI Eina_Bool ecore_x_e_window_rotation_preferred_rotation_get(Ecore_X_Window win, int *rot); /**< @since 1.9 */
2686EAPI void ecore_x_e_window_rotation_available_rotations_set(Ecore_X_Window win, const int *rots, unsigned int count); /**< @since 1.9 */
2687EAPI Eina_Bool ecore_x_e_window_rotation_available_rotations_get(Ecore_X_Window win, int **rots, unsigned int *count); /**< @since 1.9 */
2688EAPI void ecore_x_e_window_rotation_change_prepare_send(Ecore_X_Window win, int rot, Eina_Bool resize, int w, int h); /**< @since 1.9 */
2689EAPI void ecore_x_e_window_rotation_change_prepare_done_send(Ecore_X_Window root, Ecore_X_Window win, int rot); /**< @since 1.9 */
2690EAPI void ecore_x_e_window_rotation_change_request_send(Ecore_X_Window win, int rot); /**< @since 1.9 */
2691EAPI void ecore_x_e_window_rotation_change_done_send(Ecore_X_Window root, Ecore_X_Window win, int rot, int w, int h); /**< @since 1.9 */
2692
2680#ifdef __cplusplus 2693#ifdef __cplusplus
2681} 2694}
2682#endif // ifdef __cplusplus 2695#endif // ifdef __cplusplus
diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h
index 59061cf56b..6c028e6582 100644
--- a/src/lib/ecore_x/Ecore_X_Atoms.h
+++ b/src/lib/ecore_x/Ecore_X_Atoms.h
@@ -312,4 +312,14 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_DISCONNECT;
312 312
313/* for deiconify approve protcol */ 313/* for deiconify approve protcol */
314EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_DEICONIFY_APPROVE; 314EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_DEICONIFY_APPROVE;
315
316/* E window rotation extension */
317EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED;
318EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED;
319EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST;
320EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION;
321EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE;
322EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE;
323EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST;
324EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE;
315#endif /* _ECORE_X_ATOMS_H */ 325#endif /* _ECORE_X_ATOMS_H */
diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h
index 80c555c93a..a1f7ecbb85 100644
--- a/src/lib/ecore_x/ecore_x_atoms_decl.h
+++ b/src/lib/ecore_x/ecore_x_atoms_decl.h
@@ -342,6 +342,16 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE = 0;
342/* for deiconify approve protcol */ 342/* for deiconify approve protcol */
343EAPI Ecore_X_Atom ECORE_X_ATOM_E_DEICONIFY_APPROVE = 0; 343EAPI Ecore_X_Atom ECORE_X_ATOM_E_DEICONIFY_APPROVE = 0;
344 344
345/* E window rotation extension */
346EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED = 0;
347EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED = 0;
348EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST = 0;
349EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION = 0;
350EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE = 0;
351EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
352EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST = 0;
353EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE = 0;
354
345typedef struct _Atom_Item Atom_Item; 355typedef struct _Atom_Item Atom_Item;
346 356
347struct _Atom_Item 357struct _Atom_Item
@@ -641,6 +651,15 @@ const Atom_Item atom_items[] =
641 { "_E_WINDOW_PROFILE_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_REQUEST }, 651 { "_E_WINDOW_PROFILE_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_REQUEST },
642 { "_E_WINDOW_PROFILE_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE }, 652 { "_E_WINDOW_PROFILE_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE },
643 653
644 { "_E_DEICONIFY_APPROVE", &ECORE_X_ATOM_E_DEICONIFY_APPROVE } 654 { "_E_DEICONIFY_APPROVE", &ECORE_X_ATOM_E_DEICONIFY_APPROVE },
655
656 { "_E_WINDOW_ROTATION_SUPPORTED", &ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED },
657 { "_E_WINDOW_ROTATION_APP_SUPPORTED", &ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED },
658 { "_E_WINDOW_ROTATION_AVAILABLE_LIST", &ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST },
659 { "_E_WINDOW_ROTATION_PREFERRED_ROTATION", &ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION },
660 { "_E_WINDOW_ROTATION_CHANGE_PREPARE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE },
661 { "_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE },
662 { "_E_WINDOW_ROTATION_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST },
663 { "_E_WINDOW_ROTATION_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE }
645}; 664};
646 665
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_e.c b/src/lib/ecore_x/xcb/ecore_xcb_e.c
index b85659ed84..4249bb90fe 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_e.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_e.c
@@ -1942,3 +1942,292 @@ ecore_x_e_illume_window_state_send(Ecore_X_Window win,
1942 _ecore_x_e_illume_window_state_atom_get(state), 1942 _ecore_x_e_illume_window_state_atom_get(state),
1943 0, 0, 0, 0); 1943 0, 0, 0, 0);
1944} 1944}
1945
1946EAPI void
1947ecore_x_e_window_rotation_supported_set(Ecore_X_Window root,
1948 Eina_Bool enabled)
1949{
1950 Ecore_X_Window win;
1951
1952 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1953 CHECK_XCB_CONN;
1954
1955 if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
1956
1957 if (enabled)
1958 {
1959 win = ecore_x_window_new(root, 1, 2, 3, 4);
1960 ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
1961 ECORE_X_ATOM_WINDOW, &win, 1);
1962 ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
1963 ECORE_X_ATOM_WINDOW, &win, 1);
1964 }
1965 else
1966 {
1967 int ret;
1968
1969 ret =
1970 ecore_x_window_prop_xid_get(root,
1971 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
1972 ECORE_X_ATOM_WINDOW,
1973 &win, 1);
1974 if ((ret == 1) && (win))
1975 {
1976 ecore_x_window_prop_property_del(
1977 root,
1978 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED);
1979 ecore_x_window_free(win);
1980 }
1981 }
1982}
1983
1984EAPI Eina_Bool
1985ecore_x_e_window_rotation_supported_get(Ecore_X_Window root)
1986{
1987 Ecore_X_Window win, win2;
1988 int ret;
1989
1990 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1991 CHECK_XCB_CONN;
1992
1993 if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
1994
1995 ret =
1996 ecore_x_window_prop_xid_get(root,
1997 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
1998 ECORE_X_ATOM_WINDOW,
1999 &win, 1);
2000 if ((ret == 1) && (win))
2001 {
2002 ret =
2003 ecore_x_window_prop_xid_get(win,
2004 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2005 ECORE_X_ATOM_WINDOW,
2006 &win2, 1);
2007 if ((ret == 1) && (win2 == win))
2008 return EINA_TRUE;
2009 }
2010
2011 return EINA_FALSE;
2012}
2013
2014EAPI void
2015ecore_x_e_window_rotation_app_set(Ecore_X_Window win,
2016 Eina_Bool set)
2017{
2018 unsigned int val = 0;
2019
2020 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2021
2022 if (set) val = 1;
2023
2024 ecore_x_window_prop_card32_set(win,
2025 ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED,
2026 &val, 1);
2027}
2028
2029EAPI Eina_Bool
2030ecore_x_e_window_rotation_app_get(Ecore_X_Window win)
2031{
2032 unsigned int val = 0;
2033
2034 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2035
2036 if (!ecore_x_window_prop_card32_get(win,
2037 ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED,
2038 &val, 1))
2039 return EINA_FALSE;
2040
2041 return val ? EINA_TRUE : EINA_FALSE;
2042}
2043
2044EAPI void
2045ecore_x_e_window_rotation_preferred_rotation_set(Ecore_X_Window win,
2046 int rot)
2047{
2048 unsigned int val = 0;
2049
2050 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2051
2052 if (rot != -1)
2053 {
2054 val = (unsigned int)rot;
2055 ecore_x_window_prop_card32_set(win,
2056 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION,
2057 &val, 1);
2058 }
2059 else
2060 {
2061 ecore_x_window_prop_property_del(win,
2062 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION);
2063 }
2064}
2065
2066EAPI Eina_Bool
2067ecore_x_e_window_rotation_preferred_rotation_get(Ecore_X_Window win,
2068 int *rot)
2069{
2070 unsigned int val = 0;
2071 int ret = 0;
2072
2073 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2074
2075 ret = ecore_x_window_prop_card32_get(win,
2076 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION,
2077 &val, 1);
2078 if (ret == 1)
2079 {
2080 if (rot) *rot = (int)val;
2081 return EINA_TRUE;
2082 }
2083 return EINA_FALSE;
2084}
2085
2086EAPI void
2087ecore_x_e_window_rotation_available_rotations_set(Ecore_X_Window win,
2088 const int *rots,
2089 unsigned int count)
2090{
2091 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2092
2093 if (!win) return;
2094
2095 if ((rots) && (count > 0))
2096 ecore_x_window_prop_card32_set(win,
2097 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST,
2098 (unsigned int *)rots, count);
2099 else
2100 ecore_x_window_prop_property_del(win,
2101 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST);
2102}
2103
2104EAPI Eina_Bool
2105ecore_x_e_window_rotation_available_rotations_get(Ecore_X_Window win,
2106 int **rots,
2107 unsigned int *count)
2108{
2109 unsigned char *data = NULL;
2110 int num, i;
2111 int *val = NULL;
2112
2113 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2114 CHECK_XCB_CONN;
2115
2116 if ((!win) || (!rots) || (!count))
2117 return EINA_FALSE;
2118
2119 *rots = NULL;
2120 *count = 0;
2121
2122 if (!ecore_x_window_prop_property_get(win,
2123 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST,
2124 XA_CARDINAL, 32, &data, &num))
2125 return EINA_FALSE;
2126
2127 *count = num;
2128
2129 if ((num >= 1) && (data))
2130 {
2131 val = calloc(num, sizeof(int));
2132 if (!val)
2133 {
2134 *counter = 0;
2135 if (data) free(data);
2136 return EINA_FALSE;
2137 }
2138 for (i = 0; i < num; i++)
2139 val[i] = ((int *)data)[i];
2140 if (data) free(data);
2141 *rots = val;
2142 return EINA_TRUE;
2143 }
2144 if (data) free(data);
2145 return EINA_FALSE;
2146}
2147
2148EAPI void
2149ecore_x_e_window_rotation_change_prepare_send(Ecore_X_Window win,
2150 int rot,
2151 Eina_Bool resize,
2152 int w,
2153 int h)
2154{
2155 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2156
2157 ecore_x_client_message32_send(win,
2158 ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE,
2159 ECORE_X_EVENT_MASK_NONE,
2160 win, rot, resize, w, h);
2161}
2162
2163EAPI void
2164ecore_x_e_window_rotation_change_prepare_done_send(Ecore_X_Window root,
2165 Ecore_X_Window win,
2166 int rot)
2167{
2168 xcb_client_message_event_t ev;
2169
2170 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2171 CHECK_XCB_CONN;
2172
2173 if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
2174
2175 memset(&ev, 0, sizeof(xcb_client_message_event_t));
2176
2177 ev.response_type = XCB_CLIENT_MESSAGE;
2178 ev.format = 32;
2179 ev.window = win;
2180 ev.type = ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE;
2181 ev.data.data32[0] = win;
2182 ev.data.data32[1] = rot;
2183 ev.data.data32[2] = 0;
2184 ev.data.data32[3] = 0;
2185 ev.data.data32[4] = 0;
2186
2187 xcb_send_event(_ecore_xcb_conn, 0, root,
2188 (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
2189 XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
2190}
2191
2192EAPI void
2193ecore_x_e_window_rotation_change_request_send(Ecore_X_Window win,
2194 int rot)
2195{
2196 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2197
2198 ecore_x_client_message32_send(win,
2199 ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST,
2200 ECORE_X_EVENT_MASK_NONE,
2201 win, rot, 0, 0, 0);
2202}
2203
2204EAPI void
2205ecore_x_e_window_rotation_change_done_send(Ecore_X_Window root,
2206 Ecore_X_Window win,
2207 int rot,
2208 int w,
2209 int h)
2210{
2211 xcb_client_message_event_t ev;
2212
2213 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2214 CHECK_XCB_CONN;
2215
2216 if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
2217
2218 memset(&ev, 0, sizeof(xcb_client_message_event_t));
2219
2220 ev.response_type = XCB_CLIENT_MESSAGE;
2221 ev.format = 32;
2222 ev.window = win;
2223 ev.type = ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE;
2224 ev.data.data32[0] = win;
2225 ev.data.data32[1] = rot;
2226 ev.data.data32[2] = w;
2227 ev.data.data32[3] = h;
2228 ev.data.data32[4] = 0;
2229
2230 xcb_send_event(_ecore_xcb_conn, 0, root,
2231 (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
2232 XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
2233}
diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c
index 42380c0c09..f11da7d121 100644
--- a/src/lib/ecore_x/xlib/ecore_x_e.c
+++ b/src/lib/ecore_x/xlib/ecore_x_e.c
@@ -2027,3 +2027,281 @@ ecore_x_e_illume_window_state_send(Ecore_X_Window win,
2027 _ecore_x_e_illume_window_state_atom_get(state), 2027 _ecore_x_e_illume_window_state_atom_get(state),
2028 0, 0, 0, 0); 2028 0, 0, 0, 0);
2029} 2029}
2030
2031EAPI void
2032ecore_x_e_window_rotation_supported_set(Ecore_X_Window root,
2033 Eina_Bool enabled)
2034{
2035 Ecore_X_Window win;
2036
2037 if (!root)
2038 root = DefaultRootWindow(_ecore_x_disp);
2039
2040 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2041 if (enabled)
2042 {
2043 win = ecore_x_window_new(root, 1, 2, 3, 4);
2044 ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2045 ECORE_X_ATOM_WINDOW, &win, 1);
2046 ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2047 ECORE_X_ATOM_WINDOW, &win, 1);
2048 }
2049 else
2050 {
2051 int ret;
2052
2053 ret =
2054 ecore_x_window_prop_xid_get(root,
2055 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2056 ECORE_X_ATOM_WINDOW,
2057 &win, 1);
2058 if ((ret == 1) && (win))
2059 {
2060 ecore_x_window_prop_property_del(
2061 root,
2062 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED);
2063 ecore_x_window_free(win);
2064 }
2065 }
2066}
2067
2068EAPI Eina_Bool
2069ecore_x_e_window_rotation_supported_get(Ecore_X_Window root)
2070{
2071 Ecore_X_Window win, win2;
2072 int ret;
2073
2074 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2075 if (!root)
2076 root = DefaultRootWindow(_ecore_x_disp);
2077
2078 ret =
2079 ecore_x_window_prop_xid_get(root,
2080 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2081 ECORE_X_ATOM_WINDOW,
2082 &win, 1);
2083 if ((ret == 1) && (win))
2084 {
2085 ret =
2086 ecore_x_window_prop_xid_get(win,
2087 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
2088 ECORE_X_ATOM_WINDOW,
2089 &win2, 1);
2090 if ((ret == 1) && (win2 == win))
2091 return EINA_TRUE;
2092 }
2093
2094 return EINA_FALSE;
2095}
2096
2097EAPI void
2098ecore_x_e_window_rotation_app_set(Ecore_X_Window win,
2099 Eina_Bool set)
2100{
2101 unsigned int val = 0;
2102
2103 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2104
2105 if (set) val = 1;
2106
2107 ecore_x_window_prop_card32_set(win,
2108 ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED,
2109 &val, 1);
2110}
2111
2112EAPI Eina_Bool
2113ecore_x_e_window_rotation_app_get(Ecore_X_Window win)
2114{
2115 unsigned int val = 0;
2116
2117 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2118 if (!ecore_x_window_prop_card32_get(win,
2119 ECORE_X_ATOM_E_WINDOW_ROTATION_APP_SUPPORTED,
2120 &val, 1))
2121 return EINA_FALSE;
2122
2123 return val ? EINA_TRUE : EINA_FALSE;
2124}
2125
2126EAPI void
2127ecore_x_e_window_rotation_preferred_rotation_set(Ecore_X_Window win,
2128 int rot)
2129{
2130 unsigned int val = 0;
2131
2132 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2133
2134 if (rot != -1)
2135 {
2136 val = (unsigned int)rot;
2137 ecore_x_window_prop_card32_set(win,
2138 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION,
2139 &val, 1);
2140 }
2141 else
2142 {
2143 ecore_x_window_prop_property_del(win,
2144 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION);
2145 }
2146}
2147
2148EAPI Eina_Bool
2149ecore_x_e_window_rotation_preferred_rotation_get(Ecore_X_Window win,
2150 int *rot)
2151{
2152 unsigned int val = 0;
2153 int ret = 0;
2154
2155 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2156
2157 ret = ecore_x_window_prop_card32_get(win,
2158 ECORE_X_ATOM_E_WINDOW_ROTATION_PREFERRED_ROTATION,
2159 &val, 1);
2160 if (ret == 1)
2161 {
2162 if (rot) *rot = (int)val;
2163 return EINA_TRUE;
2164 }
2165 return EINA_FALSE;
2166}
2167
2168EAPI void
2169ecore_x_e_window_rotation_available_rotations_set(Ecore_X_Window win,
2170 const int *rots,
2171 unsigned int count)
2172{
2173 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2174
2175 if (!win) return;
2176
2177 if ((rots) && (count > 0))
2178 ecore_x_window_prop_card32_set(win,
2179 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST,
2180 (unsigned int *)rots, count);
2181 else
2182 ecore_x_window_prop_property_del(win,
2183 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST);
2184}
2185
2186EAPI Eina_Bool
2187ecore_x_e_window_rotation_available_rotations_get(Ecore_X_Window win,
2188 int **rots,
2189 unsigned int *count)
2190{
2191 unsigned char *data = NULL;
2192 int num, i;
2193 int *val = NULL;
2194
2195 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2196
2197 if ((!win) || (!rots) || (!count))
2198 return EINA_FALSE;
2199
2200 *rots = NULL;
2201 *count = 0;
2202
2203 if (!ecore_x_window_prop_property_get(win,
2204 ECORE_X_ATOM_E_WINDOW_ROTATION_AVAILABLE_LIST,
2205 XA_CARDINAL, 32, &data, &num))
2206 return EINA_FALSE;
2207
2208 *count = num;
2209
2210 if ((num >= 1) && (data))
2211 {
2212 val = calloc(num, sizeof(int));
2213 if (!val)
2214 {
2215 if (data) XFree(data);
2216 return EINA_FALSE;
2217 }
2218 for (i = 0; i < num; i++)
2219 val[i] = ((int *)data)[i];
2220 if (data) XFree(data);
2221 *rots = val;
2222 return EINA_TRUE;
2223 }
2224 if (data) XFree(data);
2225 return EINA_FALSE;
2226}
2227
2228EAPI void
2229ecore_x_e_window_rotation_change_prepare_send(Ecore_X_Window win,
2230 int rot,
2231 Eina_Bool resize,
2232 int w,
2233 int h)
2234{
2235 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2236 ecore_x_client_message32_send
2237 (win, ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE,
2238 ECORE_X_EVENT_MASK_NONE,
2239 win, rot, resize, w, h);
2240}
2241
2242EAPI void
2243ecore_x_e_window_rotation_change_prepare_done_send(Ecore_X_Window root,
2244 Ecore_X_Window win,
2245 int rot)
2246{
2247 XEvent xev;
2248
2249 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2250 if (!root)
2251 root = DefaultRootWindow(_ecore_x_disp);
2252
2253 xev.xclient.type = ClientMessage;
2254 xev.xclient.display = _ecore_x_disp;
2255 xev.xclient.window = win;
2256 xev.xclient.message_type = ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE;
2257 xev.xclient.format = 32;
2258 xev.xclient.data.l[0] = win;
2259 xev.xclient.data.l[1] = rot;
2260 xev.xclient.data.l[2] = 0;
2261 xev.xclient.data.l[3] = 0;
2262 xev.xclient.data.l[4] = 0;
2263
2264 XSendEvent(_ecore_x_disp, root, False,
2265 SubstructureRedirectMask | SubstructureNotifyMask,
2266 &xev);
2267}
2268
2269EAPI void
2270ecore_x_e_window_rotation_change_request_send(Ecore_X_Window win,
2271 int rot)
2272{
2273 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2274 ecore_x_client_message32_send
2275 (win, ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST,
2276 ECORE_X_EVENT_MASK_NONE,
2277 win, rot, 0, 0, 0);
2278}
2279
2280EAPI void
2281ecore_x_e_window_rotation_change_done_send(Ecore_X_Window root,
2282 Ecore_X_Window win,
2283 int rot,
2284 int w,
2285 int h)
2286{
2287 XEvent xev;
2288
2289 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2290 if (!root)
2291 root = DefaultRootWindow(_ecore_x_disp);
2292
2293 xev.xclient.type = ClientMessage;
2294 xev.xclient.display = _ecore_x_disp;
2295 xev.xclient.window = win;
2296 xev.xclient.message_type = ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE;
2297 xev.xclient.format = 32;
2298 xev.xclient.data.l[0] = win;
2299 xev.xclient.data.l[1] = rot;
2300 xev.xclient.data.l[2] = w;
2301 xev.xclient.data.l[3] = h;
2302 xev.xclient.data.l[4] = 0;
2303
2304 XSendEvent(_ecore_x_disp, root, False,
2305 SubstructureRedirectMask | SubstructureNotifyMask,
2306 &xev);
2307}