devilhorns pushed a commit to branch master.

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

commit d47538dc0e0f839caae248aca60fbf191862c6cd
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Fri Jun 9 11:01:03 2017 -0400

    ecore-wl2: Fix window rotation event structure and various typos
    
    As these events will be raised to ecore_evas_wl and the handlers there
    do not pass along the Ecore_Evas as 'data', we need to change the type
    of variable passed along in the event struture so that
    ecore_event_window_match can be called to find the Ecore_Evas.
    
    This patch also fixes some typos discovered during compile
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        |  4 ++--
 src/lib/ecore_wl2/ecore_wl2.c        |  8 ++++----
 src/lib/ecore_wl2/ecore_wl2_window.c | 21 +++++++++++----------
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 4e7faad254..daa46a1aa0 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -278,7 +278,7 @@ typedef struct _Ecore_Wl2_Event_Output_Transform
 
 typedef struct _Ecore_Wl2_Event_Window_Rotation
 {
-   Ecore_Wl2_Window *window;
+   unsigned int win;
    int rotation, w, h, angle;
    Eina_Bool resize : 1;
 } Ecore_Wl2_Event_Window_Rotation;
@@ -1081,7 +1081,7 @@ EAPI void 
ecore_wl2_window_available_rotations_set(Ecore_Wl2_Window *window, con
  * @ingroup Ecore_Wl2_Window_Group
  * @since 1.20
  */
-EAPI Eina_Bool ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window 
*window, int **rots, unsigned int count);
+EAPI Eina_Bool ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window 
*window, int **rots, unsigned int *count);
 
 EAPI void ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window 
*window, int rot, int w, int h, Eina_Bool resize);
 EAPI void ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window 
*window, int rot);
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index c8967d1f47..d206618d37 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -41,10 +41,10 @@ EAPI int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = 0;
 EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 0;
 EAPI int ECORE_WL2_EVENT_OUTPUT_TRANSFORM = 0;
 EAPI int ECORE_WL2_EVENT_WINDOW_ROTATE = 0;
-EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = 0;
-EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
-EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = 0;
-EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_DONE = 0;
+EAPI int ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = 0;
+EAPI int ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
+EAPI int ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = 0;
+EAPI int ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_DONE = 0;
 
 EAPI int _ecore_wl2_event_window_www = -1;
 EAPI int _ecore_wl2_event_window_www_drag = -1;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 9d3823b354..618ebb8f5a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1261,17 +1261,18 @@ 
ecore_wl2_window_available_rotations_set(Ecore_Wl2_Window *window, const int *ro
 {
    EINA_SAFETY_ON_NULL_RETURN(window);
    window->wm_rot.count = count;
-   window->wm_rot.available_rots = rots;
+   window->wm_rot.available_rots = (int *)rots;
 }
 
 EAPI Eina_Bool
-ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window *window, int **rots, 
unsigned int count)
+ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window *window, int **rots, 
unsigned int *count)
 {
-   int i = 0;
+   unsigned int i = 0;
    int *val = NULL;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
 
+   *rots = NULL;
    *count = window->wm_rot.count;
 
    if (window->wm_rot.count >= 1)
@@ -1299,7 +1300,7 @@ 
ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window *window, int rot,
    ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare));
    if (!ev) return;
 
-   ev->window = window;
+   ev->win = window->id;
    ev->rotation = rot;
    ev->w = w;
    ev->h = h;
@@ -1318,7 +1319,7 @@ 
ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int
    ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done));
    if (!ev) return;
 
-   ev->window = window;
+   ev->win = window->id;
    ev->rotation = rot;
    ev->w = 0;
    ev->h = 0;
@@ -1331,14 +1332,14 @@ 
ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int
 EAPI void
 ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int 
rot)
 {
-   Ecore_Wl2_Event_Window_Rotation_Change_Reqest *ev;
+   Ecore_Wl2_Event_Window_Rotation_Change_Request *ev;
 
    EINA_SAFETY_ON_NULL_RETURN(window);
 
    ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request));
    if (!ev) return;
 
-   ev->window = window;
+   ev->win = window->id;
    ev->rotation = rot;
    ev->w = 0;
    ev->h = 0;
@@ -1351,14 +1352,14 @@ 
ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int rot)
 EAPI void
 ecore_wl2_window_rotation_change_done_send(Ecore_Wl2_Window *window, int rot, 
int w, int h)
 {
-   Ecore_Wl2_Event_Window_Rotation_Change_Reqest *ev;
+   Ecore_Wl2_Event_Window_Rotation_Change_Done *ev;
 
    EINA_SAFETY_ON_NULL_RETURN(window);
 
-   ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request));
+   ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Done));
    if (!ev) return;
 
-   ev->window = window;
+   ev->win = window->id;
    ev->rotation = rot;
    ev->w = w;
    ev->h = h;

-- 


Reply via email to