summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-07-06 10:16:21 -0400
committerChris Michael <cp.michael@samsung.com>2018-07-06 10:16:21 -0400
commit78f27a3efff24ba3b935cc9e2620718e51af9304 (patch)
tree13a69cef3687cb032c8eae6110a0a95133a804ec
parentacb125419f922d2a0826960633536969eced5ce7 (diff)
ecore_wl2: Replace window ids with pointers
Summary: There's no benefit to generating ids instead of just using the Ecore_Wl2_Window pointer in events. This has the added benefit of working around a really nasty hash collision bug when multiple ecore_evas engines are used at once. ref T7053 ref T6222 @beta_break Depends on D6521 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers, zmike Tags: #efl Maniphest Tasks: T7053, T6222 Differential Revision: https://phab.enlightenment.org/D6522
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h75
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c17
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_dnd.c38
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c122
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h10
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_surface.c2
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c55
-rw-r--r--src/lib/elementary/efl_selection_manager.c12
-rw-r--r--src/lib/elementary/efl_ui_win.c6
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c58
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h2
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c4
12 files changed, 187 insertions, 214 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 4f628f3424..00cf2f79b4 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -90,7 +90,7 @@ typedef struct _Ecore_Wl2_Event_Global
90 90
91typedef struct _Ecore_Wl2_Event_Focus_In 91typedef struct _Ecore_Wl2_Event_Focus_In
92{ 92{
93 unsigned int window; 93 Ecore_Wl2_Window *window;
94 unsigned int timestamp; 94 unsigned int timestamp;
95 Eo *dev; //The seat device 95 Eo *dev; //The seat device
96 Ecore_Wl2_Display *display; 96 Ecore_Wl2_Display *display;
@@ -98,7 +98,7 @@ typedef struct _Ecore_Wl2_Event_Focus_In
98 98
99typedef struct _Ecore_Wl2_Event_Focus_Out 99typedef struct _Ecore_Wl2_Event_Focus_Out
100{ 100{
101 unsigned int window; 101 Ecore_Wl2_Window *window;
102 unsigned int timestamp; 102 unsigned int timestamp;
103 Eo *dev; //The seat device 103 Eo *dev; //The seat device
104 Ecore_Wl2_Display *display; 104 Ecore_Wl2_Display *display;
@@ -106,7 +106,7 @@ typedef struct _Ecore_Wl2_Event_Focus_Out
106 106
107typedef struct _Ecore_Wl2_Event_Dnd_Enter 107typedef struct _Ecore_Wl2_Event_Dnd_Enter
108{ 108{
109 unsigned int win, source; 109 Ecore_Wl2_Window *win, *source;
110 Ecore_Wl2_Offer *offer; 110 Ecore_Wl2_Offer *offer;
111 int x, y; 111 int x, y;
112 unsigned int seat; 112 unsigned int seat;
@@ -115,7 +115,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Enter
115 115
116typedef struct _Ecore_Wl2_Event_Dnd_Leave 116typedef struct _Ecore_Wl2_Event_Dnd_Leave
117{ 117{
118 unsigned int win, source; 118 Ecore_Wl2_Window *win, *source;
119 Ecore_Wl2_Offer *offer; 119 Ecore_Wl2_Offer *offer;
120 unsigned int seat; 120 unsigned int seat;
121 Ecore_Wl2_Display *display; 121 Ecore_Wl2_Display *display;
@@ -123,7 +123,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Leave
123 123
124typedef struct _Ecore_Wl2_Event_Dnd_Motion 124typedef struct _Ecore_Wl2_Event_Dnd_Motion
125{ 125{
126 unsigned int win, source; 126 Ecore_Wl2_Window *win, *source;
127 Ecore_Wl2_Offer *offer; 127 Ecore_Wl2_Offer *offer;
128 int x, y; 128 int x, y;
129 unsigned int seat; 129 unsigned int seat;
@@ -132,7 +132,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Motion
132 132
133typedef struct _Ecore_Wl2_Event_Dnd_Drop 133typedef struct _Ecore_Wl2_Event_Dnd_Drop
134{ 134{
135 unsigned int win, source; 135 Ecore_Wl2_Window *win, *source;
136 int x, y; 136 int x, y;
137 Ecore_Wl2_Offer *offer; 137 Ecore_Wl2_Offer *offer;
138 unsigned int seat; 138 unsigned int seat;
@@ -141,14 +141,14 @@ typedef struct _Ecore_Wl2_Event_Dnd_Drop
141 141
142typedef struct _Ecore_Wl2_Event_Dnd_End 142typedef struct _Ecore_Wl2_Event_Dnd_End
143{ 143{
144 unsigned int win, source; 144 Ecore_Wl2_Window *win, *source;
145 unsigned int seat; 145 unsigned int seat;
146 Ecore_Wl2_Display *display; 146 Ecore_Wl2_Display *display;
147} Ecore_Wl2_Event_Dnd_End; 147} Ecore_Wl2_Event_Dnd_End;
148 148
149struct _Ecore_Wl2_Event_Data_Source_Event 149struct _Ecore_Wl2_Event_Data_Source_Event
150{ 150{
151 unsigned int win, source; 151 Ecore_Wl2_Window *win, *source;
152 Ecore_Wl2_Drag_Action action; 152 Ecore_Wl2_Drag_Action action;
153 unsigned int seat; 153 unsigned int seat;
154 uint32_t serial; 154 uint32_t serial;
@@ -157,7 +157,7 @@ struct _Ecore_Wl2_Event_Data_Source_Event
157 157
158typedef struct Ecore_Wl2_Event_Data_Source_End 158typedef struct Ecore_Wl2_Event_Data_Source_End
159{ 159{
160 unsigned int win, source; 160 Ecore_Wl2_Window *win, *source;
161 Ecore_Wl2_Drag_Action action; 161 Ecore_Wl2_Drag_Action action;
162 unsigned int seat; 162 unsigned int seat;
163 uint32_t serial; 163 uint32_t serial;
@@ -216,7 +216,7 @@ typedef enum
216typedef struct _Ecore_Wl2_Event_Device 216typedef struct _Ecore_Wl2_Event_Device
217{ 217{
218 Eo *dev; 218 Eo *dev;
219 int window_id; 219 Ecore_Wl2_Window *window;
220 unsigned int seat_id; 220 unsigned int seat_id;
221 Ecore_Wl2_Device_Type type; 221 Ecore_Wl2_Device_Type type;
222} Ecore_Wl2_Event_Device; 222} Ecore_Wl2_Event_Device;
@@ -236,14 +236,15 @@ typedef enum
236 236
237typedef struct _Ecore_Wl2_Event_Window_Configure 237typedef struct _Ecore_Wl2_Event_Window_Configure
238{ 238{
239 unsigned int win, event_win, edges; 239 Ecore_Wl2_Window *win, *event_win;
240 unsigned int edges;
240 unsigned int w, h; 241 unsigned int w, h;
241 unsigned int states; 242 unsigned int states;
242} Ecore_Wl2_Event_Window_Configure; 243} Ecore_Wl2_Event_Window_Configure;
243 244
244typedef struct _Ecore_Wl2_Event_Window_Configure_Complete 245typedef struct _Ecore_Wl2_Event_Window_Configure_Complete
245{ 246{
246 unsigned int win; 247 Ecore_Wl2_Window *win;
247} Ecore_Wl2_Event_Window_Configure_Complete; 248} Ecore_Wl2_Event_Window_Configure_Complete;
248 249
249typedef struct _Ecore_Wl2_Event_Input_Keymap_Changed 250typedef struct _Ecore_Wl2_Event_Input_Keymap_Changed
@@ -281,7 +282,7 @@ typedef struct _Ecore_Wl2_Event_Output_Transform
281 282
282typedef struct _Ecore_Wl2_Event_Window_Rotation 283typedef struct _Ecore_Wl2_Event_Window_Rotation
283{ 284{
284 unsigned int win; 285 Ecore_Wl2_Window *win;
285 int rotation, w, h, angle; 286 int rotation, w, h, angle;
286 Eina_Bool resize : 1; 287 Eina_Bool resize : 1;
287} Ecore_Wl2_Event_Window_Rotation; 288} Ecore_Wl2_Event_Window_Rotation;
@@ -292,35 +293,35 @@ typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_
292 293
293typedef struct _Ecore_Wl2_Event_Window_Show 294typedef struct _Ecore_Wl2_Event_Window_Show
294{ 295{
295 unsigned int win; 296 Ecore_Wl2_Window *win;
296 unsigned int parent_win; 297 Ecore_Wl2_Window *parent_win;
297 unsigned int event_win; 298 Ecore_Wl2_Window *event_win;
298} Ecore_Wl2_Event_Window_Show; 299} Ecore_Wl2_Event_Window_Show;
299 300
300typedef struct _Ecore_Wl2_Event_Window_Hide 301typedef struct _Ecore_Wl2_Event_Window_Hide
301{ 302{
302 unsigned int win; 303 Ecore_Wl2_Window *win;
303 unsigned int parent_win; 304 Ecore_Wl2_Window *parent_win;
304 unsigned int event_win; 305 Ecore_Wl2_Window *event_win;
305} Ecore_Wl2_Event_Window_Hide; 306} Ecore_Wl2_Event_Window_Hide;
306 307
307typedef struct _Ecore_Wl2_Event_Window_Activate 308typedef struct _Ecore_Wl2_Event_Window_Activate
308{ 309{
309 unsigned int win; 310 Ecore_Wl2_Window *win;
310 unsigned int parent_win; 311 Ecore_Wl2_Window *parent_win;
311 unsigned int event_win; 312 Ecore_Wl2_Window *event_win;
312} Ecore_Wl2_Event_Window_Activate; 313} Ecore_Wl2_Event_Window_Activate;
313 314
314typedef struct _Ecore_Wl2_Event_Window_Deactivate 315typedef struct _Ecore_Wl2_Event_Window_Deactivate
315{ 316{
316 unsigned int win; 317 Ecore_Wl2_Window *win;
317 unsigned int parent_win; 318 Ecore_Wl2_Window *parent_win;
318 unsigned int event_win; 319 Ecore_Wl2_Window *event_win;
319} Ecore_Wl2_Event_Window_Deactivate; 320} Ecore_Wl2_Event_Window_Deactivate;
320 321
321typedef struct _Ecore_Wl2_Event_Window_Iconify_State_Change 322typedef struct _Ecore_Wl2_Event_Window_Iconify_State_Change
322{ 323{
323 unsigned int win; 324 Ecore_Wl2_Window *win;
324 unsigned int iconified; 325 unsigned int iconified;
325 unsigned int force; 326 unsigned int force;
326} Ecore_Wl2_Event_Window_Iconify_State_Change; 327} Ecore_Wl2_Event_Window_Iconify_State_Change;
@@ -342,20 +343,20 @@ typedef enum _Ecore_Wl2_Window_Type
342 343
343typedef struct _Ecore_Wl2_Event_Aux_Hint_Allowed 344typedef struct _Ecore_Wl2_Event_Aux_Hint_Allowed
344{ 345{
345 unsigned int win; 346 Ecore_Wl2_Window *win;
346 int id; 347 int id;
347 Ecore_Wl2_Display *display; 348 Ecore_Wl2_Display *display;
348} Ecore_Wl2_Event_Aux_Hint_Allowed; 349} Ecore_Wl2_Event_Aux_Hint_Allowed;
349 350
350typedef struct _Ecore_Wl2_Event_Aux_Hint_Supported 351typedef struct _Ecore_Wl2_Event_Aux_Hint_Supported
351{ 352{
352 unsigned int win; 353 Ecore_Wl2_Window *win;
353 Ecore_Wl2_Display *display; 354 Ecore_Wl2_Display *display;
354} Ecore_Wl2_Event_Aux_Hint_Supported; 355} Ecore_Wl2_Event_Aux_Hint_Supported;
355 356
356typedef struct Ecore_Wl2_Event_Aux_Message 357typedef struct Ecore_Wl2_Event_Aux_Message
357{ 358{
358 unsigned int win; 359 Ecore_Wl2_Window *win;
359 Eina_Stringshare *key; 360 Eina_Stringshare *key;
360 Eina_Stringshare *val; 361 Eina_Stringshare *val;
361 Eina_List *options; 362 Eina_List *options;
@@ -364,7 +365,7 @@ typedef struct Ecore_Wl2_Event_Aux_Message
364 365
365typedef struct Ecore_Wl2_Event_Window_Offscreen 366typedef struct Ecore_Wl2_Event_Window_Offscreen
366{ 367{
367 unsigned int win; 368 Ecore_Wl2_Window *win;
368} Ecore_Wl2_Event_Window_Offscreen; 369} Ecore_Wl2_Event_Window_Offscreen;
369 370
370typedef struct _Ecore_Wl2_Buffer Ecore_Wl2_Buffer; 371typedef struct _Ecore_Wl2_Buffer Ecore_Wl2_Buffer;
@@ -681,7 +682,7 @@ EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find_by_name(const Ecore_Wl2_Displ
681 * @ingroup Ecore_Wl2_Display_Group 682 * @ingroup Ecore_Wl2_Display_Group
682 * @since 1.17 683 * @since 1.17
683 */ 684 */
684EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id); 685EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, uintptr_t id);
685 686
686/** 687/**
687 * Retrieves the Wayland Registry used for the current Wayland display. 688 * Retrieves the Wayland Registry used for the current Wayland display.
@@ -744,18 +745,6 @@ EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display);
744EAPI Ecore_Wl2_Window *ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h); 745EAPI Ecore_Wl2_Window *ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h);
745 746
746/** 747/**
747 * Get the window id associated with an Ecore_Wl2_Window
748 *
749 * @param window The Ecore_Wl2_Window of which to retrieve the window id
750 *
751 * @return The id associated with this window
752 *
753 * @ingroup Ecore_Wl2_Window_Group
754 * @since 1.17
755 */
756EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window);
757
758/**
759 * Get the wl_surface which belongs to this window 748 * Get the wl_surface which belongs to this window
760 * 749 *
761 * @param window The Ecore_Wl2_Window to get the surface of 750 * @param window The Ecore_Wl2_Window to get the surface of
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index a216df108a..e759e11ce1 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -145,7 +145,7 @@ _aux_hints_supported_aux_hints(void *data, struct efl_aux_hints *aux_hints EINA_
145 } 145 }
146 146
147 if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Supported)))) return; 147 if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Supported)))) return;
148 ev->win = win->id; 148 ev->win = win;
149 ev->display = ewd; 149 ev->display = ewd;
150 ewd->refs++; 150 ewd->refs++;
151 ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev, _display_event_free, ewd); 151 ecore_event_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, ev, _display_event_free, ewd);
@@ -164,7 +164,7 @@ _aux_hints_allowed_aux_hint(void *data, struct efl_aux_hints *aux_hints EINA_UN
164 if (!win) return; 164 if (!win) return;
165 165
166 if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Allowed)))) return; 166 if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Allowed)))) return;
167 ev->win = win->id; 167 ev->win = win;
168 ev->id = id; 168 ev->id = id;
169 ev->display = ewd; 169 ev->display = ewd;
170 ewd->refs++; 170 ewd->refs++;
@@ -212,7 +212,7 @@ _aux_hints_aux_message(void *data, struct efl_aux_hints *aux_hints EINA_UNUSED,
212 } 212 }
213 } 213 }
214 214
215 ev->win = win->id; 215 ev->win = win;
216 ev->key = eina_stringshare_add(key); 216 ev->key = eina_stringshare_add(key);
217 ev->val = eina_stringshare_add(val); 217 ev->val = eina_stringshare_add(val);
218 ev->options = opt_list; 218 ev->options = opt_list;
@@ -1084,16 +1084,9 @@ ecore_wl2_display_screen_size_get(Ecore_Wl2_Display *display, int *w, int *h)
1084} 1084}
1085 1085
1086EAPI Ecore_Wl2_Window * 1086EAPI Ecore_Wl2_Window *
1087ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id) 1087ecore_wl2_display_window_find(Ecore_Wl2_Display *display EINA_UNUSED, uintptr_t id)
1088{ 1088{
1089 Ecore_Wl2_Window *window; 1089 return (Ecore_Wl2_Window *)id;
1090
1091 EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
1092
1093 EINA_INLIST_FOREACH(display->windows, window)
1094 if (window->id == (int)id) return window;
1095
1096 return NULL;
1097} 1090}
1098 1091
1099EAPI struct wl_registry * 1092EAPI struct wl_registry *
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index b3fcb458e6..b39ecc2b84 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -53,21 +53,21 @@ struct _Ecore_Wl2_Offer
53 uint32_t serial; 53 uint32_t serial;
54 Eina_List *reads; 54 Eina_List *reads;
55 int ref; 55 int ref;
56 unsigned int window_id; 56 Ecore_Wl2_Window *window;
57 Eina_Bool proxied : 1; 57 Eina_Bool proxied : 1;
58}; 58};
59 59
60static int 60Ecore_Wl2_Window *
61_win_id_get(Ecore_Wl2_Input *input) 61_win_id_get(Ecore_Wl2_Input *input)
62{ 62{
63 int win = 0; 63 Ecore_Wl2_Window *win = NULL;
64 64
65 if (input->focus.pointer) 65 if (input->focus.pointer)
66 win = input->focus.pointer->id; 66 win = input->focus.pointer;
67 else if (input->focus.prev_pointer) 67 else if (input->focus.prev_pointer)
68 win = input->focus.prev_pointer->id; 68 win = input->focus.prev_pointer;
69 else if (input->focus.keyboard) 69 else if (input->focus.keyboard)
70 win = input->focus.keyboard->id; 70 win = input->focus.keyboard;
71 71
72 return win; 72 return win;
73} 73}
@@ -149,7 +149,7 @@ static void
149event_fill(struct _Ecore_Wl2_Event_Data_Source_Event *ev, Ecore_Wl2_Input *input) 149event_fill(struct _Ecore_Wl2_Event_Data_Source_Event *ev, Ecore_Wl2_Input *input)
150{ 150{
151 if (input->focus.keyboard) 151 if (input->focus.keyboard)
152 ev->source = input->focus.keyboard->id; 152 ev->source = input->focus.keyboard;
153 153
154 ev->win = _win_id_get(input); 154 ev->win = _win_id_get(input);
155 ev->action = input->data.drag.action; 155 ev->action = input->data.drag.action;
@@ -256,7 +256,7 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
256 if (input->drag.offer) 256 if (input->drag.offer)
257 { 257 {
258 input->drag.offer->serial = serial; 258 input->drag.offer->serial = serial;
259 input->drag.offer->window_id = window->id; 259 input->drag.offer->window = window;
260 260
261 if (input->display->wl.data_device_manager_version >= 261 if (input->display->wl.data_device_manager_version >=
262 WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION) 262 WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION)
@@ -269,14 +269,14 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
269 else input->drag.offer = NULL; 269 else input->drag.offer = NULL;
270 270
271 input->drag.enter_serial = serial; 271 input->drag.enter_serial = serial;
272 input->drag.window_id = window->id; 272 input->drag.window = window;
273 273
274 ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Enter)); 274 ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Enter));
275 if (!ev) return; 275 if (!ev) return;
276 276
277 if (input->focus.keyboard) 277 if (input->focus.keyboard)
278 ev->source = input->focus.keyboard->id; 278 ev->source = input->focus.keyboard;
279 ev->win = input->drag.window_id; 279 ev->win = input->drag.window;
280 280
281 ev->x = x; 281 ev->x = x;
282 ev->y = y; 282 ev->y = y;
@@ -311,9 +311,9 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
311 if (!ev) return; 311 if (!ev) return;
312 312
313 if (input->focus.keyboard) 313 if (input->focus.keyboard)
314 ev->source = input->focus.keyboard->id; 314 ev->source = input->focus.keyboard;
315 315
316 ev->win = input->drag.window_id; 316 ev->win = input->drag.window;
317 ev->offer = input->drag.offer; 317 ev->offer = input->drag.offer;
318 if (ev->offer) 318 if (ev->offer)
319 ev->offer->ref++; 319 ev->offer->ref++;
@@ -321,7 +321,7 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
321 ev->display = input->display; 321 ev->display = input->display;
322 ev->display->refs++; 322 ev->display->refs++;
323 323
324 input->drag.window_id = 0; 324 input->drag.window = NULL;
325 input->drag.enter_serial = 0; 325 input->drag.enter_serial = 0;
326 input->drag.offer = NULL; 326 input->drag.offer = NULL;
327 ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, _delay_offer_destroy, ev->offer); 327 ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, _delay_offer_destroy, ev->offer);
@@ -342,9 +342,9 @@ _ecore_wl2_dnd_motion(Ecore_Wl2_Input *input, int x, int y, uint32_t serial)
342 input->drag.offer->serial = serial; 342 input->drag.offer->serial = serial;
343 343
344 if (input->focus.keyboard) 344 if (input->focus.keyboard)
345 ev->source = input->focus.keyboard->id; 345 ev->source = input->focus.keyboard;
346 346
347 ev->win = input->drag.window_id; 347 ev->win = input->drag.window;
348 ev->x = x; 348 ev->x = x;
349 ev->y = y; 349 ev->y = y;
350 ev->offer = input->drag.offer; 350 ev->offer = input->drag.offer;
@@ -364,9 +364,9 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
364 if (!ev) return; 364 if (!ev) return;
365 365
366 if (input->focus.keyboard) 366 if (input->focus.keyboard)
367 ev->source = input->focus.keyboard->id; 367 ev->source = input->focus.keyboard;
368 368
369 ev->win = input->drag.window_id; 369 ev->win = input->drag.window;
370 ev->x = input->pointer.sx; 370 ev->x = input->pointer.sx;
371 ev->y = input->pointer.sy; 371 ev->y = input->pointer.sy;
372 ev->offer = input->drag.offer; 372 ev->offer = input->drag.offer;
@@ -524,7 +524,7 @@ ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input)
524 if (!ev) return; 524 if (!ev) return;
525 525
526 if (input->focus.keyboard) 526 if (input->focus.keyboard)
527 ev->source = input->focus.keyboard->id; 527 ev->source = input->focus.keyboard;
528 528
529 529
530 ev->win = _win_id_get(input); 530 ev->win = _win_id_get(input);
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 9d6378f1bb..14de4dc9f0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -47,10 +47,10 @@ typedef struct _Ecore_Wl2_Mouse_Down_Info
47{ 47{
48 EINA_INLIST; 48 EINA_INLIST;
49 int device, sx, sy; 49 int device, sx, sy;
50 int last_win; 50 Ecore_Wl2_Window *last_win;
51 int last_last_win; 51 Ecore_Wl2_Window *last_last_win;
52 int last_event_win; 52 Ecore_Wl2_Window *last_event_win;
53 int last_last_event_win; 53 Ecore_Wl2_Window *last_last_event_win;
54 unsigned int last_time; 54 unsigned int last_time;
55 unsigned int last_last_time; 55 unsigned int last_last_time;
56 Eina_Bool double_click : 1; 56 Eina_Bool double_click : 1;
@@ -82,14 +82,14 @@ _ecore_wl2_input_mouse_down_info_get(int device)
82} 82}
83 83
84static Ecore_Wl2_Input_Devices * 84static Ecore_Wl2_Input_Devices *
85_ecore_wl2_devices_get(const Ecore_Wl2_Input *input, int window_id) 85_ecore_wl2_devices_get(const Ecore_Wl2_Input *input, const Ecore_Wl2_Window *window)
86{ 86{
87 Ecore_Wl2_Input_Devices *devices; 87 Ecore_Wl2_Input_Devices *devices;
88 Eina_List *l; 88 Eina_List *l;
89 89
90 EINA_LIST_FOREACH(input->devices_list, l, devices) 90 EINA_LIST_FOREACH(input->devices_list, l, devices)
91 { 91 {
92 if (devices->window_id == window_id) 92 if (devices->window == window)
93 return devices; 93 return devices;
94 } 94 }
95 95
@@ -97,11 +97,11 @@ _ecore_wl2_devices_get(const Ecore_Wl2_Input *input, int window_id)
97} 97}
98 98
99static Eo * 99static Eo *
100_ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int window_id) 100_ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
101{ 101{
102 Ecore_Wl2_Input_Devices *devices; 102 Ecore_Wl2_Input_Devices *devices;
103 103
104 devices = _ecore_wl2_devices_get(input, window_id); 104 devices = _ecore_wl2_devices_get(input, window);
105 if (devices && devices->pointer_dev) 105 if (devices && devices->pointer_dev)
106 return efl_ref(devices->pointer_dev); 106 return efl_ref(devices->pointer_dev);
107 107
@@ -109,11 +109,11 @@ _ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int window_id)
109} 109}
110 110
111static Eo * 111static Eo *
112_ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, int window_id) 112_ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
113{ 113{
114 Ecore_Wl2_Input_Devices *devices; 114 Ecore_Wl2_Input_Devices *devices;
115 115
116 devices = _ecore_wl2_devices_get(input, window_id); 116 devices = _ecore_wl2_devices_get(input, window);
117 if (devices && devices->touch_dev) 117 if (devices && devices->touch_dev)
118 return efl_ref(devices->touch_dev); 118 return efl_ref(devices->touch_dev);
119 119
@@ -121,11 +121,11 @@ _ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, int window_id)
121} 121}
122 122
123static Eo * 123static Eo *
124_ecore_wl2_seat_dev_get(Ecore_Wl2_Input *input, int window_id) 124_ecore_wl2_seat_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
125{ 125{
126 Ecore_Wl2_Input_Devices *devices; 126 Ecore_Wl2_Input_Devices *devices;
127 127
128 devices = _ecore_wl2_devices_get(input, window_id); 128 devices = _ecore_wl2_devices_get(input, window);
129 if (devices) 129 if (devices)
130 return efl_ref(devices->seat_dev); 130 return efl_ref(devices->seat_dev);
131 131
@@ -150,11 +150,11 @@ _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
150 150
151 ev->x = input->pointer.sx; 151 ev->x = input->pointer.sx;
152 ev->y = input->pointer.sy; 152 ev->y = input->pointer.sy;
153 ev->window = window->id; 153 ev->window = (Ecore_Window)window;
154 ev->event_window = window->id; 154 ev->event_window = (Ecore_Window)window;
155 ev->timestamp = input->timestamp; 155 ev->timestamp = input->timestamp;
156 ev->modifiers = input->keyboard.modifiers; 156 ev->modifiers = input->keyboard.modifiers;
157 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id); 157 ev->dev = _ecore_wl2_mouse_dev_get(input, window);
158 158
159 ecore_event_add(ECORE_EVENT_MOUSE_IN, ev, _input_event_cb_free, ev->dev); 159 ecore_event_add(ECORE_EVENT_MOUSE_IN, ev, _input_event_cb_free, ev->dev);
160} 160}
@@ -169,11 +169,11 @@ _ecore_wl2_input_mouse_out_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window
169 169
170 ev->x = input->pointer.sx; 170 ev->x = input->pointer.sx;
171 ev->y = input->pointer.sy; 171 ev->y = input->pointer.sy;
172 ev->window = window->id; 172 ev->window = (Ecore_Window)window;
173 ev->event_window = window->id; 173 ev->event_window = (Ecore_Window)window;
174 ev->timestamp = input->timestamp; 174 ev->timestamp = input->timestamp;
175 ev->modifiers = input->keyboard.modifiers; 175 ev->modifiers = input->keyboard.modifiers;
176 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id); 176 ev->dev = _ecore_wl2_mouse_dev_get(input, window);
177 177
178 ecore_event_add(ECORE_EVENT_MOUSE_OUT, ev, _input_event_cb_free, ev->dev); 178 ecore_event_add(ECORE_EVENT_MOUSE_OUT, ev, _input_event_cb_free, ev->dev);
179} 179}
@@ -187,8 +187,8 @@ _ecore_wl2_input_mouse_move_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
187 ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)); 187 ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
188 if (!ev) return; 188 if (!ev) return;
189 189
190 ev->window = window->id; 190 ev->window = (Ecore_Window)window;
191 ev->event_window = window->id; 191 ev->event_window = (Ecore_Window)window;
192 ev->timestamp = input->timestamp; 192 ev->timestamp = input->timestamp;
193 ev->x = input->pointer.sx; 193 ev->x = input->pointer.sx;
194 ev->y = input->pointer.sy; 194 ev->y = input->pointer.sy;
@@ -207,9 +207,9 @@ _ecore_wl2_input_mouse_move_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
207 ev->multi.root.y = input->pointer.sy; 207 ev->multi.root.y = input->pointer.sy;
208 208
209 if ((input->focus.touch) && (input->focus.touch == window)) 209 if ((input->focus.touch) && (input->focus.touch == window))
210 ev->dev = _ecore_wl2_touch_dev_get(input, window->id); 210 ev->dev = _ecore_wl2_touch_dev_get(input, window);
211 else if ((input->focus.pointer) && (input->focus.pointer == window)) 211 else if ((input->focus.pointer) && (input->focus.pointer == window))
212 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id); 212 ev->dev = _ecore_wl2_mouse_dev_get(input, window);
213 213
214 info = _ecore_wl2_input_mouse_down_info_get(device); 214 info = _ecore_wl2_input_mouse_down_info_get(device);
215 if (info) 215 if (info)
@@ -248,27 +248,27 @@ _ecore_wl2_input_mouse_wheel_send(Ecore_Wl2_Input *input, unsigned int axis, int
248 248
249 if (input->grab.window) 249 if (input->grab.window)
250 { 250 {
251 ev->window = input->grab.window->id; 251 ev->window = (Ecore_Window)input->grab.window;
252 ev->event_window = input->grab.window->id; 252 ev->event_window = (Ecore_Window)input->grab.window;
253 } 253 }
254 else if (input->focus.pointer) 254 else if (input->focus.pointer)
255 { 255 {
256 ev->window = input->focus.pointer->id; 256 ev->window = (Ecore_Window)input->focus.pointer;
257 ev->event_window = input->focus.pointer->id; 257 ev->event_window = (Ecore_Window)input->focus.pointer;
258 ev->dev = _ecore_wl2_mouse_dev_get(input, input->focus.pointer->id); 258 ev->dev = _ecore_wl2_mouse_dev_get(input, input->focus.pointer);
259 } 259 }
260 else if (input->focus.touch) 260 else if (input->focus.touch)
261 { 261 {
262 ev->window = input->focus.touch->id; 262 ev->window = (Ecore_Window)input->focus.touch;
263 ev->event_window = input->focus.touch->id; 263 ev->event_window = (Ecore_Window)input->focus.touch;
264 ev->dev = _ecore_wl2_touch_dev_get(input, input->focus.touch->id); 264 ev->dev = _ecore_wl2_touch_dev_get(input, input->focus.touch);
265 } 265 }
266 266
267 if (!ev->dev) 267 if (!ev->dev)
268 { 268 {
269 ev->dev = _ecore_wl2_mouse_dev_get(input, ev->window); 269 ev->dev = _ecore_wl2_mouse_dev_get(input, (Ecore_Wl2_Window *)ev->window);
270 if (!ev->dev) 270 if (!ev->dev)
271 ev->dev = _ecore_wl2_touch_dev_get(input, ev->window); 271 ev->dev = _ecore_wl2_touch_dev_get(input, (Ecore_Wl2_Window *)ev->window);
272 } 272 }
273 273
274 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _input_event_cb_free, ev->dev); 274 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, _input_event_cb_free, ev->dev);
@@ -318,8 +318,8 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
318 } 318 }
319 319
320 if (((int)(timestamp - info->last_time) <= (int)(1000 * 0.25)) && 320 if (((int)(timestamp - info->last_time) <= (int)(1000 * 0.25)) &&
321 ((window) && (window->id == info->last_win) && 321 ((window) && (window == info->last_win) &&
322 (window->id == info->last_event_win))) 322 (window == info->last_event_win)))
323 { 323 {
324 ev->double_click = 1; 324 ev->double_click = 1;
325 info->double_click = EINA_TRUE; 325 info->double_click = EINA_TRUE;
@@ -332,10 +332,10 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
332 332
333 if (((int)(timestamp - info->last_last_time) <= 333 if (((int)(timestamp - info->last_last_time) <=
334 (int)(2 * 1000 * 0.25)) && 334 (int)(2 * 1000 * 0.25)) &&
335 ((window) && (window->id == info->last_win) && 335 ((window) && (window == info->last_win) &&
336 (window->id == info->last_last_win) && 336 (window == info->last_last_win) &&
337 (window->id == info->last_event_win) && 337 (window == info->last_event_win) &&
338 (window->id == info->last_last_event_win))) 338 (window == info->last_last_event_win)))
339 { 339 {
340 ev->triple_click = 1; 340 ev->triple_click = 1;
341 info->triple_click = EINA_TRUE; 341 info->triple_click = EINA_TRUE;
@@ -357,13 +357,13 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
357 357
358 if (window) 358 if (window)
359 { 359 {
360 ev->window = window->id; 360 ev->window = (Ecore_Window)window;
361 ev->event_window = window->id; 361 ev->event_window = (Ecore_Window)window;
362 362
363 if ((input->focus.touch) && (input->focus.touch == window)) 363 if ((input->focus.touch) && (input->focus.touch == window))
364 ev->dev = _ecore_wl2_touch_dev_get(input, window->id); 364 ev->dev = _ecore_wl2_touch_dev_get(input, window);
365 else if ((input->focus.pointer) && (input->focus.pointer == window)) 365 else if ((input->focus.pointer) && (input->focus.pointer == window))
366 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id); 366 ev->dev = _ecore_wl2_mouse_dev_get(input, window);
367 } 367 }
368 368
369 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, 369 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev,
@@ -372,9 +372,9 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
372 if ((info) && (!info->triple_click)) 372 if ((info) && (!info->triple_click))
373 { 373 {
374 info->last_last_win = info->last_win; 374 info->last_last_win = info->last_win;
375 info->last_win = ev->window; 375 info->last_win = (Ecore_Wl2_Window *)ev->window;
376 info->last_last_event_win = info->last_event_win; 376 info->last_last_event_win = info->last_event_win;
377 info->last_event_win = ev->window; 377 info->last_event_win = (Ecore_Wl2_Window *)ev->window;
378 info->last_last_time = info->last_time; 378 info->last_last_time = info->last_time;
379 info->last_time = timestamp; 379 info->last_time = timestamp;
380 } 380 }
@@ -433,13 +433,13 @@ _ecore_wl2_input_mouse_up_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window,
433 ev->multi.root.x = input->pointer.sx; 433 ev->multi.root.x = input->pointer.sx;
434 ev->multi.root.y = input->pointer.sy; 434 ev->multi.root.y = input->pointer.sy;
435 435
436 ev->window = window->id; 436 ev->window = (Ecore_Window)window;
437 ev->event_window = window->id; 437 ev->event_window = (Ecore_Window)window;
438 438
439 if ((input->focus.touch) && (input->focus.touch == window)) 439 if ((input->focus.touch) && (input->focus.touch == window))
440 ev->dev = _ecore_wl2_touch_dev_get(input, window->id); 440 ev->dev = _ecore_wl2_touch_dev_get(input, window);
441 else if ((input->focus.pointer) && (input->focus.pointer == window)) 441 else if ((input->focus.pointer) && (input->focus.pointer == window))
442 ev->dev = _ecore_wl2_mouse_dev_get(input, window->id); 442 ev->dev = _ecore_wl2_mouse_dev_get(input, window);
443 443
444 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, 444 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev,
445 _input_event_cb_free, ev->dev); 445 _input_event_cb_free, ev->dev);
@@ -464,8 +464,8 @@ _ecore_wl2_input_focus_in_send(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input)
464 if (!ev) return; 464 if (!ev) return;
465 465
466 ev->timestamp = input->timestamp; 466 ev->timestamp = input->timestamp;
467 ev->window = window->id; 467 ev->window = window;
468 ev->dev = _ecore_wl2_seat_dev_get(input, window->id); 468 ev->dev = _ecore_wl2_seat_dev_get(input, window);
469 ev->display = input->display; 469 ev->display = input->display;
470 ev->display->refs++; 470 ev->display->refs++;
471 ecore_event_add(ECORE_WL2_EVENT_FOCUS_IN, ev, _input_event_focus_cb_free, 471 ecore_event_add(ECORE_WL2_EVENT_FOCUS_IN, ev, _input_event_focus_cb_free,
@@ -481,8 +481,8 @@ _ecore_wl2_input_focus_out_send(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input
481 if (!ev) return; 481 if (!ev) return;
482 482
483 ev->timestamp = input->timestamp; 483 ev->timestamp = input->timestamp;
484 ev->window = window->id; 484 ev->window = window;
485 ev->dev = _ecore_wl2_seat_dev_get(input, window->id); 485 ev->dev = _ecore_wl2_seat_dev_get(input, window);
486 ev->display = input->display; 486 ev->display = input->display;
487 ev->display->refs++; 487 ev->display->refs++;
488 ecore_event_add(ECORE_WL2_EVENT_FOCUS_OUT, ev, _input_event_focus_cb_free, 488 ecore_event_add(ECORE_WL2_EVENT_FOCUS_OUT, ev, _input_event_focus_cb_free,
@@ -609,11 +609,11 @@ _ecore_wl2_input_symbol_rep_find(xkb_keysym_t keysym, char *buffer, int size, un
609} 609}
610 610
611static Eo * 611static Eo *
612_ecore_wl2_keyboard_dev_get(Ecore_Wl2_Input *input, int window_id) 612_ecore_wl2_keyboard_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window * window)
613{ 613{
614 Ecore_Wl2_Input_Devices *devices; 614 Ecore_Wl2_Input_Devices *devices;
615 615
616 devices = _ecore_wl2_devices_get(input, window_id); 616 devices = _ecore_wl2_devices_get(input, window);
617 if (devices && devices->keyboard_dev) 617 if (devices && devices->keyboard_dev)
618 return efl_ref(devices->keyboard_dev); 618 return efl_ref(devices->keyboard_dev);
619 619
@@ -649,12 +649,12 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_
649 strcpy((char *)ev->key, key); 649 strcpy((char *)ev->key, key);
650 if (comp_len) strcpy((char *)ev->compose, compose); 650 if (comp_len) strcpy((char *)ev->compose, compose);
651 651
652 ev->window = window->id; 652 ev->window = (Ecore_Window)window;
653 ev->event_window = window->id; 653 ev->event_window = (Ecore_Window)window;
654 ev->timestamp = timestamp; 654 ev->timestamp = timestamp;
655 ev->modifiers = input->keyboard.modifiers; 655 ev->modifiers = input->keyboard.modifiers;
656 ev->keycode = code; 656 ev->keycode = code;
657 ev->dev = _ecore_wl2_keyboard_dev_get(input, window->id); 657 ev->dev = _ecore_wl2_keyboard_dev_get(input, window);
658 658
659 /* DBG("Emitting Key event (%s,%s,%s,%s)\n", ev->keyname, ev->key, ev->compose, ev->string); */ 659 /* DBG("Emitting Key event (%s,%s,%s,%s)\n", ev->keyname, ev->key, ev->compose, ev->string); */
660 660
@@ -1535,7 +1535,7 @@ _ecore_wl2_cb_device_event(void *data, int type, void *event)
1535 1535
1536 EINA_LIST_FOREACH(input->devices_list, l, devs) 1536 EINA_LIST_FOREACH(input->devices_list, l, devs)
1537 { 1537 {
1538 if (devs->window_id == ev->window_id) 1538 if (devs->window == ev->window)
1539 { 1539 {
1540 devices = devs; 1540 devices = devs;
1541 break; 1541 break;
@@ -1550,7 +1550,7 @@ _ecore_wl2_cb_device_event(void *data, int type, void *event)
1550 EINA_SAFETY_ON_NULL_RETURN_VAL(devices, ECORE_CALLBACK_PASS_ON); 1550 EINA_SAFETY_ON_NULL_RETURN_VAL(devices, ECORE_CALLBACK_PASS_ON);
1551 input->devices_list = 1551 input->devices_list =
1552 eina_list_append(input->devices_list, devices); 1552 eina_list_append(input->devices_list, devices);
1553 devices->window_id = ev->window_id; 1553 devices->window = ev->window;
1554 } 1554 }
1555 1555
1556 if (ev->type == ECORE_WL2_DEVICE_TYPE_POINTER) 1556 if (ev->type == ECORE_WL2_DEVICE_TYPE_POINTER)
@@ -1747,7 +1747,7 @@ _ecore_wl2_input_window_remove(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
1747 } 1747 }
1748 1748
1749 EINA_LIST_FOREACH_SAFE(input->devices_list, l, l_next, devices) 1749 EINA_LIST_FOREACH_SAFE(input->devices_list, l, l_next, devices)
1750 if (devices->window_id == window->id) 1750 if (devices->window == window)
1751 { 1751 {
1752 _ecore_wl2_devices_free(devices); 1752 _ecore_wl2_devices_free(devices);
1753 input->devices_list = eina_list_remove_list(input->devices_list, l); 1753 input->devices_list = eina_list_remove_list(input->devices_list, l);
@@ -1828,7 +1828,7 @@ ecore_wl2_input_seat_device_get(const Ecore_Wl2_Input *input, const Ecore_Wl2_Wi
1828 EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL); 1828 EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
1829 EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); 1829 EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
1830 1830
1831 devices = _ecore_wl2_devices_get(input, window->id); 1831 devices = _ecore_wl2_devices_get(input, window);
1832 return devices ? devices->seat_dev : NULL; 1832 return devices ? devices->seat_dev : NULL;
1833} 1833}
1834 1834
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index b636612270..1ac9b44808 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -69,7 +69,7 @@ typedef struct _Ecore_Wl2_Input_Devices
69 Eo *keyboard_dev; 69 Eo *keyboard_dev;
70 Eo *touch_dev; 70 Eo *touch_dev;
71 Eo *seat_dev; 71 Eo *seat_dev;
72 int window_id; 72 Ecore_Wl2_Window *window;
73} Ecore_Wl2_Input_Devices; 73} Ecore_Wl2_Input_Devices;
74 74
75struct _Ecore_Wl2_Display 75struct _Ecore_Wl2_Display
@@ -173,7 +173,7 @@ struct _Ecore_Wl2_Window
173 173
174 Ecore_Wl2_Surface *wl2_surface; 174 Ecore_Wl2_Surface *wl2_surface;
175 175
176 int id, rotation, surface_id; 176 int rotation, surface_id;
177 const char *title; 177 const char *title;
178 const char *class; 178 const char *class;
179 const char *role; 179 const char *role;
@@ -509,7 +509,7 @@ struct _Ecore_Wl2_Input
509 { 509 {
510 Ecore_Wl2_Offer *offer; 510 Ecore_Wl2_Offer *offer;
511 uint32_t enter_serial; 511 uint32_t enter_serial;
512 Ecore_Window window_id; 512 Ecore_Wl2_Window *window;
513 } drag, selection; 513 } drag, selection;
514 514
515 unsigned int seat_version; 515 unsigned int seat_version;
@@ -523,7 +523,7 @@ struct _Ecore_Wl2_Input
523 523
524typedef struct Ecore_Wl2_Event_Window_WWW 524typedef struct Ecore_Wl2_Event_Window_WWW
525{ 525{
526 unsigned int window; 526 Ecore_Wl2_Window *window;
527 int x_rel; 527 int x_rel;
528 int y_rel; 528 int y_rel;
529 uint32_t timestamp; 529 uint32_t timestamp;
@@ -531,7 +531,7 @@ typedef struct Ecore_Wl2_Event_Window_WWW
531 531
532typedef struct Ecore_Wl2_Event_Window_WWW_Drag 532typedef struct Ecore_Wl2_Event_Window_WWW_Drag
533{ 533{
534 unsigned int window; 534 Ecore_Wl2_Window *window;
535 Eina_Bool dragging; 535 Eina_Bool dragging;
536} Ecore_Wl2_Event_Window_WWW_Drag; 536} Ecore_Wl2_Event_Window_WWW_Drag;
537 537
diff --git a/src/lib/ecore_wl2/ecore_wl2_surface.c b/src/lib/ecore_wl2/ecore_wl2_surface.c
index 0f769b486b..b2029d11f6 100644
--- a/src/lib/ecore_wl2/ecore_wl2_surface.c
+++ b/src/lib/ecore_wl2/ecore_wl2_surface.c
@@ -76,7 +76,7 @@ _ecore_wl2_surface_cb_offscreen(void *data, int type EINA_UNUSED, void *event)
76 Ecore_Wl2_Event_Window_Offscreen *ev = event; 76 Ecore_Wl2_Event_Window_Offscreen *ev = event;
77 Ecore_Wl2_Surface *surf = data; 77 Ecore_Wl2_Surface *surf = data;
78 78
79 if (surf->wl2_win->id == (int)ev->win) 79 if (surf->wl2_win == ev->win)
80 ecore_wl2_surface_flush(surf, EINA_FALSE); 80 ecore_wl2_surface_flush(surf, EINA_FALSE);
81 81
82 return ECORE_CALLBACK_RENEW; 82 return ECORE_CALLBACK_RENEW;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 0b48fea5be..b1366291bc 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -54,10 +54,10 @@ _ecore_wl2_window_activate_send(Ecore_Wl2_Window *window)
54 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Activate)); 54 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Activate));
55 if (!ev) return; 55 if (!ev) return;
56 56
57 ev->win = window->id; 57 ev->win = window;
58 if (window->parent) 58 if (window->parent)
59 ev->parent_win = window->parent->id; 59 ev->parent_win = window->parent;
60 ev->event_win = window->id; 60 ev->event_win = window;
61 ecore_event_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE, ev, NULL, NULL); 61 ecore_event_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE, ev, NULL, NULL);
62} 62}
63 63
@@ -69,10 +69,10 @@ _ecore_wl2_window_deactivate_send(Ecore_Wl2_Window *window)
69 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Deactivate)); 69 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Deactivate));
70 if (!ev) return; 70 if (!ev) return;
71 71
72 ev->win = window->id; 72 ev->win = window;
73 if (window->parent) 73 if (window->parent)
74 ev->parent_win = window->parent->id; 74 ev->parent_win = window->parent;
75 ev->event_win = window->id; 75 ev->event_win = window;
76 ecore_event_add(ECORE_WL2_EVENT_WINDOW_DEACTIVATE, ev, NULL, NULL); 76 ecore_event_add(ECORE_WL2_EVENT_WINDOW_DEACTIVATE, ev, NULL, NULL);
77} 77}
78 78
@@ -84,8 +84,8 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
84 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure)); 84 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure));
85 if (!ev) return; 85 if (!ev) return;
86 86
87 ev->win = win->id; 87 ev->win = win;
88 ev->event_win = win->id; 88 ev->event_win = win;
89 89
90 if ((win->set_config.geometry.w == win->def_config.geometry.w) && 90 if ((win->set_config.geometry.w == win->def_config.geometry.w) &&
91 (win->set_config.geometry.h == win->def_config.geometry.h)) 91 (win->set_config.geometry.h == win->def_config.geometry.h))
@@ -124,7 +124,7 @@ _configure_complete(Ecore_Wl2_Window *window)
124 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete)); 124 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete));
125 if (!ev) return; 125 if (!ev) return;
126 126
127 ev->win = window->id; 127 ev->win = window;
128 ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL); 128 ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL);
129 129
130} 130}
@@ -139,7 +139,7 @@ _www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
139 139
140 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag)); 140 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
141 EINA_SAFETY_ON_NULL_RETURN(ev); 141 EINA_SAFETY_ON_NULL_RETURN(ev);
142 ev->window = window->id; 142 ev->window = window;
143 ev->dragging = 0; 143 ev->dragging = 0;
144 144
145 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL); 145 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
@@ -153,7 +153,7 @@ _www_surface_start_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
153 153
154 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag)); 154 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
155 EINA_SAFETY_ON_NULL_RETURN(ev); 155 EINA_SAFETY_ON_NULL_RETURN(ev);
156 ev->window = window->id; 156 ev->window = window;
157 ev->dragging = 1; 157 ev->dragging = 1;
158 158
159 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL); 159 ecore_event_add(_ecore_wl2_event_window_www_drag, ev, NULL, NULL);
@@ -167,7 +167,7 @@ _www_surface_status(void *data, struct www_surface *www_surface EINA_UNUSED, int
167 167
168 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW)); 168 ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW));
169 EINA_SAFETY_ON_NULL_RETURN(ev); 169 EINA_SAFETY_ON_NULL_RETURN(ev);
170 ev->window = window->id; 170 ev->window = window;
171 ev->x_rel = x_rel; 171 ev->x_rel = x_rel;
172 ev->y_rel = y_rel; 172 ev->y_rel = y_rel;
173 ev->timestamp = timestamp; 173 ev->timestamp = timestamp;
@@ -465,7 +465,7 @@ _surface_leave(void *data, struct wl_surface *surf EINA_UNUSED, struct wl_output
465 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Offscreen)); 465 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Offscreen));
466 if (ev) 466 if (ev)
467 { 467 {
468 ev->win = win->id; 468 ev->win = win;
469 ecore_event_add(ECORE_WL2_EVENT_WINDOW_OFFSCREEN, ev, NULL, NULL); 469 ecore_event_add(ECORE_WL2_EVENT_WINDOW_OFFSCREEN, ev, NULL, NULL);
470 } 470 }
471 } 471 }
@@ -514,10 +514,10 @@ _ecore_wl2_window_show_send(Ecore_Wl2_Window *window)
514 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Show)); 514 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Show));
515 if (!ev) return; 515 if (!ev) return;
516 516
517 ev->win = window->id; 517 ev->win = window;
518 if (window->parent) 518 if (window->parent)
519 ev->parent_win = window->parent->id; 519 ev->parent_win = window->parent;
520 ev->event_win = window->id; 520 ev->event_win = window;
521 ecore_event_add(ECORE_WL2_EVENT_WINDOW_SHOW, ev, NULL, NULL); 521 ecore_event_add(ECORE_WL2_EVENT_WINDOW_SHOW, ev, NULL, NULL);
522} 522}
523 523
@@ -529,10 +529,10 @@ _ecore_wl2_window_hide_send(Ecore_Wl2_Window *window)
529 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Hide)); 529 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Hide));
530 if (!ev) return; 530 if (!ev) return;
531 531
532 ev->win = window->id; 532 ev->win = window;
533 if (window->parent) 533 if (window->parent)
534 ev->parent_win = window->parent->id; 534 ev->parent_win = window->parent;
535 ev->event_win = window->id; 535 ev->event_win = window;
536 ecore_event_add(ECORE_WL2_EVENT_WINDOW_HIDE, ev, NULL, NULL); 536 ecore_event_add(ECORE_WL2_EVENT_WINDOW_HIDE, ev, NULL, NULL);
537} 537}
538 538
@@ -540,7 +540,6 @@ EAPI Ecore_Wl2_Window *
540ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h) 540ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h)
541{ 541{
542 Ecore_Wl2_Window *win; 542 Ecore_Wl2_Window *win;
543 static int _win_id = 1;
544 543
545 EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL); 544 EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
546 if (display->pid) CRI("CANNOT CREATE WINDOW WITH SERVER DISPLAY"); 545 if (display->pid) CRI("CANNOT CREATE WINDOW WITH SERVER DISPLAY");
@@ -552,7 +551,6 @@ ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x
552 551
553 win->display = display; 552 win->display = display;
554 win->parent = parent; 553 win->parent = parent;
555 win->id = _win_id++;
556 554
557 win->set_config.geometry.x = x; 555 win->set_config.geometry.x = x;
558 win->set_config.geometry.y = y; 556 win->set_config.geometry.y = y;
@@ -573,13 +571,6 @@ ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x
573 return win; 571 return win;
574} 572}
575 573
576EAPI int
577ecore_wl2_window_id_get(Ecore_Wl2_Window *window)
578{
579 EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1);
580 return window->id;
581}
582
583EAPI struct wl_surface * 574EAPI struct wl_surface *
584ecore_wl2_window_surface_get(Ecore_Wl2_Window *window) 575ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
585{ 576{
@@ -1257,7 +1248,7 @@ ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window *window, int rot,
1257 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare)); 1248 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare));
1258 if (!ev) return; 1249 if (!ev) return;
1259 1250
1260 ev->win = window->id; 1251 ev->win = window;
1261 ev->rotation = rot; 1252 ev->rotation = rot;
1262 ev->w = w; 1253 ev->w = w;
1263 ev->h = h; 1254 ev->h = h;
@@ -1276,7 +1267,7 @@ ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int
1276 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done)); 1267 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done));
1277 if (!ev) return; 1268 if (!ev) return;
1278 1269
1279 ev->win = window->id; 1270 ev->win = window;
1280 ev->rotation = rot; 1271 ev->rotation = rot;
1281 ev->w = 0; 1272 ev->w = 0;
1282 ev->h = 0; 1273 ev->h = 0;
@@ -1296,7 +1287,7 @@ ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int rot)
1296 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request)); 1287 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request));
1297 if (!ev) return; 1288 if (!ev) return;
1298 1289
1299 ev->win = window->id; 1290 ev->win = window;
1300 ev->rotation = rot; 1291 ev->rotation = rot;
1301 ev->w = 0; 1292 ev->w = 0;
1302 ev->h = 0; 1293 ev->h = 0;
@@ -1316,7 +1307,7 @@ ecore_wl2_window_rotation_change_done_send(Ecore_Wl2_Window *window, int rot, in
1316 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Done)); 1307 ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Done));
1317 if (!ev) return; 1308 if (!ev) return;
1318 1309
1319 ev->win = window->id; 1310 ev->win = window;
1320 ev->rotation = rot; 1311 ev->rotation = rot;
1321 ev->w = w; 1312 ev->w = w;
1322 ev->h = h; 1313 ev->h = h;
diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c
index 8ba6d758f4..0bd501e8fa 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -2960,7 +2960,7 @@ _wl_sel_obj_del2(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
2960} 2960}
2961 2961
2962static Sel_Manager_Dropable * 2962static Sel_Manager_Dropable *
2963_wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win) 2963_wl_dropable_find(Efl_Selection_Manager_Data *pd, Ecore_Wl2_Window *win)
2964{ 2964{
2965 Eina_List *l; 2965 Eina_List *l;
2966 Sel_Manager_Dropable *dropable; 2966 Sel_Manager_Dropable *dropable;
@@ -2968,7 +2968,7 @@ _wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win)
2968 2968
2969 if (!pd->drop_list) return NULL; 2969 if (!pd->drop_list) return NULL;
2970 2970
2971 window = ecore_wl2_display_window_find(_elm_wl_display, win); 2971 window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win);
2972 if (!window) return NULL; 2972 if (!window) return NULL;
2973 2973
2974 EINA_LIST_FOREACH(pd->drop_list, l, dropable) 2974 EINA_LIST_FOREACH(pd->drop_list, l, dropable)
@@ -2979,7 +2979,7 @@ _wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win)
2979} 2979}
2980 2980
2981static Evas * 2981static Evas *
2982_wl_evas_get_from_win(Efl_Selection_Manager_Data *pd, unsigned int win) 2982_wl_evas_get_from_win(Efl_Selection_Manager_Data *pd, Ecore_Wl2_Window *win)
2983{ 2983{
2984 Sel_Manager_Dropable *dropable = _wl_dropable_find(pd, win); 2984 Sel_Manager_Dropable *dropable = _wl_dropable_find(pd, win);
2985 return dropable ? evas_object_evas_get(dropable->obj) : NULL; 2985 return dropable ? evas_object_evas_get(dropable->obj) : NULL;
@@ -3368,13 +3368,13 @@ _wl_dropable_handle(Sel_Manager_Seat_Selection *seat_sel, Sel_Manager_Dropable *
3368} 3368}
3369 3369
3370static void 3370static void
3371_wl_dropable_all_clean(Sel_Manager_Seat_Selection *seat_sel, unsigned int win) 3371_wl_dropable_all_clean(Sel_Manager_Seat_Selection *seat_sel, Ecore_Wl2_Window *win)
3372{ 3372{
3373 Eina_List *l; 3373 Eina_List *l;
3374 Sel_Manager_Dropable *dropable; 3374 Sel_Manager_Dropable *dropable;
3375 Ecore_Wl2_Window *window; 3375 Ecore_Wl2_Window *window;
3376 3376
3377 window = ecore_wl2_display_window_find(_elm_wl_display, win); 3377 window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win);
3378 if (!window) return; 3378 if (!window) return;
3379 3379
3380 EINA_LIST_FOREACH(seat_sel->pd->drop_list, l, dropable) 3380 EINA_LIST_FOREACH(seat_sel->pd->drop_list, l, dropable)
@@ -3718,7 +3718,7 @@ _wl_dnd_drop(void *data, int type EINA_UNUSED, void *event)
3718 } 3718 }
3719 } 3719 }
3720 3720
3721 win = ecore_wl2_display_window_find(pd->wl_display, ev->win); 3721 win = ecore_wl2_display_window_find(pd->wl_display, (Ecore_Window)ev->win);
3722 ecore_wl2_dnd_drag_end(_wl_seat_get(win, NULL, seat_sel->seat)); 3722 ecore_wl2_dnd_drag_end(_wl_seat_get(win, NULL, seat_sel->seat));
3723 return ECORE_CALLBACK_PASS_ON; 3723 return ECORE_CALLBACK_PASS_ON;
3724} 3724}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index c81f9a9acf..cead522d10 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4337,7 +4337,7 @@ _elm_win_wl_configure(void *data, int t EINA_UNUSED, void *event)
4337{ 4337{
4338 Ecore_Wl2_Event_Window_Configure *ev = event; 4338 Ecore_Wl2_Event_Window_Configure *ev = event;
4339 ELM_WIN_DATA_GET(data, sd); 4339 ELM_WIN_DATA_GET(data, sd);
4340 if (ecore_wl2_window_id_get(sd->wl.win) != (int)ev->win) return ECORE_CALLBACK_RENEW; 4340 if (sd->wl.win != ev->win) return ECORE_CALLBACK_RENEW;
4341 4341
4342 if (sd->resizing && (!ev->edges)) sd->resizing = EINA_FALSE; 4342 if (sd->resizing && (!ev->edges)) sd->resizing = EINA_FALSE;
4343 return ECORE_CALLBACK_RENEW; 4343 return ECORE_CALLBACK_RENEW;
@@ -8413,14 +8413,14 @@ _elm_win_window_id_get(Efl_Ui_Win_Data *sd)
8413{ 8413{
8414#if HAVE_ELEMENTARY_WL2 8414#if HAVE_ELEMENTARY_WL2
8415 if (sd->wl.win) 8415 if (sd->wl.win)
8416 return (Ecore_Window)ecore_wl2_window_id_get(sd->wl.win); 8416 return (Ecore_Window)sd->wl.win;
8417 if (sd->parent) 8417 if (sd->parent)
8418 { 8418 {
8419 Ecore_Wl2_Window *parent; 8419 Ecore_Wl2_Window *parent;
8420 8420
8421 parent = elm_win_wl_window_get(sd->parent); 8421 parent = elm_win_wl_window_get(sd->parent);
8422 if (parent) 8422 if (parent)
8423 return (Ecore_Window)ecore_wl2_window_id_get(parent); 8423 return (Ecore_Window)parent;
8424 } 8424 }
8425#endif 8425#endif
8426#ifdef HAVE_ELEMENTARY_X 8426#ifdef HAVE_ELEMENTARY_X
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 974f49caa3..a3c01bf509 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -115,9 +115,9 @@ _ecore_evas_wl_common_cb_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED,
115 LOGFN(__FILE__, __LINE__, __FUNCTION__); 115 LOGFN(__FILE__, __LINE__, __FUNCTION__);
116 116
117 ev = event; 117 ev = event;
118 ee = ecore_event_window_match(ev->window); 118 ee = ecore_event_window_match((Ecore_Window)ev->window);
119 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 119 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
120 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 120 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
121 if (_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON; 121 if (_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
122 122
123 _ecore_evas_mouse_inout_set(ee, ev->dev, EINA_TRUE, EINA_FALSE); 123 _ecore_evas_mouse_inout_set(ee, ev->dev, EINA_TRUE, EINA_FALSE);
@@ -136,9 +136,9 @@ _ecore_evas_wl_common_cb_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED,
136 LOGFN(__FILE__, __LINE__, __FUNCTION__); 136 LOGFN(__FILE__, __LINE__, __FUNCTION__);
137 137
138 ev = event; 138 ev = event;
139 ee = ecore_event_window_match(ev->window); 139 ee = ecore_event_window_match((Ecore_Window)ev->window);
140 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 140 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
141 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 141 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
142 if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON; 142 if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
143 143
144 ecore_event_evas_seat_modifier_lock_update(ee->evas, 144 ecore_event_evas_seat_modifier_lock_update(ee->evas,
@@ -158,9 +158,9 @@ _ecore_evas_wl_common_cb_focus_in(void *data EINA_UNUSED, int type EINA_UNUSED,
158 LOGFN(__FILE__, __LINE__, __FUNCTION__); 158 LOGFN(__FILE__, __LINE__, __FUNCTION__);
159 159
160 ev = event; 160 ev = event;
161 ee = ecore_event_window_match(ev->window); 161 ee = ecore_event_window_match((Ecore_Window)ev->window);
162 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 162 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
163 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 163 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
164 _ecore_evas_focus_device_set(ee, ev->dev, EINA_TRUE); 164 _ecore_evas_focus_device_set(ee, ev->dev, EINA_TRUE);
165 return ECORE_CALLBACK_PASS_ON; 165 return ECORE_CALLBACK_PASS_ON;
166} 166}
@@ -174,9 +174,9 @@ _ecore_evas_wl_common_cb_focus_out(void *data EINA_UNUSED, int type EINA_UNUSED,
174 LOGFN(__FILE__, __LINE__, __FUNCTION__); 174 LOGFN(__FILE__, __LINE__, __FUNCTION__);
175 175
176 ev = event; 176 ev = event;
177 ee = ecore_event_window_match(ev->window); 177 ee = ecore_event_window_match((Ecore_Window)ev->window);
178 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 178 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
179 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 179 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
180 _ecore_evas_focus_device_set(ee, ev->dev, EINA_FALSE); 180 _ecore_evas_focus_device_set(ee, ev->dev, EINA_FALSE);
181 return ECORE_CALLBACK_PASS_ON; 181 return ECORE_CALLBACK_PASS_ON;
182} 182}
@@ -570,9 +570,9 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
570 LOGFN(__FILE__, __LINE__, __FUNCTION__); 570 LOGFN(__FILE__, __LINE__, __FUNCTION__);
571 571
572 ev = event; 572 ev = event;
573 ee = ecore_event_window_match(ev->win); 573 ee = ecore_event_window_match((Ecore_Window)ev->win);
574 if (!ee) return ECORE_CALLBACK_PASS_ON; 574 if (!ee) return ECORE_CALLBACK_PASS_ON;
575 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 575 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
576 576
577 wdata = ee->engine.data; 577 wdata = ee->engine.data;
578 if (!wdata) return ECORE_CALLBACK_PASS_ON; 578 if (!wdata) return ECORE_CALLBACK_PASS_ON;
@@ -683,10 +683,10 @@ _ecore_evas_wl_common_cb_window_configure_complete(void *data EINA_UNUSED, int t
683 LOGFN(__FILE__, __LINE__, __FUNCTION__); 683 LOGFN(__FILE__, __LINE__, __FUNCTION__);
684 684
685 ev = event; 685 ev = event;
686 ee = ecore_event_window_match(ev->win); 686 ee = ecore_event_window_match((Ecore_Window)ev->win);
687 if (!ee) return ECORE_CALLBACK_PASS_ON; 687 if (!ee) return ECORE_CALLBACK_PASS_ON;
688 688
689 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 689 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
690 690
691 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas); 691 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
692 if (!einfo) return ECORE_CALLBACK_PASS_ON; 692 if (!einfo) return ECORE_CALLBACK_PASS_ON;
@@ -709,9 +709,9 @@ _ecore_evas_wl_common_cb_aux_message(void *data EINA_UNUSED, int type EINA_UNUS
709 Ecore_Wl2_Event_Aux_Message *ev; 709 Ecore_Wl2_Event_Aux_Message *ev;
710 710
711 ev = event; 711 ev = event;
712 ee = ecore_event_window_match(ev->win); 712 ee = ecore_event_window_match((Ecore_Window)ev->win);
713 if (!ee) return ECORE_CALLBACK_PASS_ON; 713 if (!ee) return ECORE_CALLBACK_PASS_ON;
714 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 714 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
715 if (eina_streq(ev->key, "stack_del")) 715 if (eina_streq(ev->key, "stack_del"))
716 { 716 {
717 if (ee->func.fn_delete_request) 717 if (ee->func.fn_delete_request)
@@ -729,9 +729,9 @@ _ecore_evas_wl_common_cb_aux_hint_supported(void *data EINA_UNUSED, int type EI
729 Ecore_Evas_Engine_Wl_Data *wdata; 729 Ecore_Evas_Engine_Wl_Data *wdata;
730 730
731 ev = event; 731 ev = event;
732 ee = ecore_event_window_match(ev->win); 732 ee = ecore_event_window_match((Ecore_Window)ev->win);
733 if (!ee) return ECORE_CALLBACK_PASS_ON; 733 if (!ee) return ECORE_CALLBACK_PASS_ON;
734 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 734 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
735 wdata = ee->engine.data; 735 wdata = ee->engine.data;
736 EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint) eina_stringshare_del(hint); 736 EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint) eina_stringshare_del(hint);
737 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win); 737 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
@@ -747,9 +747,9 @@ _ecore_evas_wl_common_cb_aux_hint_allowed(void *data EINA_UNUSED, int type EINA
747 Ecore_Evas_Aux_Hint *aux; 747 Ecore_Evas_Aux_Hint *aux;
748 748
749 ev = event; 749 ev = event;
750 ee = ecore_event_window_match(ev->win); 750 ee = ecore_event_window_match((Ecore_Window)ev->win);
751 if (!ee) return ECORE_CALLBACK_PASS_ON; 751 if (!ee) return ECORE_CALLBACK_PASS_ON;
752 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 752 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
753 753
754 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux) 754 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
755 { 755 {
@@ -776,9 +776,9 @@ _ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNU
776 LOGFN(__FILE__, __LINE__, __FUNCTION__); 776 LOGFN(__FILE__, __LINE__, __FUNCTION__);
777 777
778 ev = event; 778 ev = event;
779 ee = ecore_event_window_match(ev->win); 779 ee = ecore_event_window_match((Ecore_Window)ev->win);
780 if (!ee) return ECORE_CALLBACK_PASS_ON; 780 if (!ee) return ECORE_CALLBACK_PASS_ON;
781 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 781 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
782 _ecore_evas_wl_common_rotation_set(ee, ev->rotation, ev->resize); 782 _ecore_evas_wl_common_rotation_set(ee, ev->rotation, ev->resize);
783 return ECORE_CALLBACK_PASS_ON; 783 return ECORE_CALLBACK_PASS_ON;
784} 784}
@@ -944,9 +944,9 @@ _ecore_evas_wl_common_cb_www_drag(void *d EINA_UNUSED, int t EINA_UNUSED, void *
944 Ecore_Evas_Engine_Wl_Data *wdata; 944 Ecore_Evas_Engine_Wl_Data *wdata;
945 Ecore_Evas *ee; 945 Ecore_Evas *ee;
946 946
947 ee = ecore_event_window_match(ev->window); 947 ee = ecore_event_window_match((Ecore_Window)ev->window);
948 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 948 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
949 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 949 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
950 950
951 wdata = ee->engine.data; 951 wdata = ee->engine.data;
952 wdata->dragging = !!ev->dragging; 952 wdata->dragging = !!ev->dragging;
@@ -962,9 +962,9 @@ _ecore_evas_wl_common_cb_www(void *d EINA_UNUSED, int t EINA_UNUSED, void *event
962 Ecore_Evas_Engine_Wl_Data *wdata; 962 Ecore_Evas_Engine_Wl_Data *wdata;
963 Ecore_Evas *ee; 963 Ecore_Evas *ee;
964 964
965 ee = ecore_event_window_match(ev->window); 965 ee = ecore_event_window_match((Ecore_Window)ev->window);
966 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; 966 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
967 if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 967 if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
968 968
969 wdata = ee->engine.data; 969 wdata = ee->engine.data;
970 wdata->x_rel += ev->x_rel; 970 wdata->x_rel += ev->x_rel;
@@ -992,7 +992,7 @@ _ecore_evas_wl_common_device_event_add(int event_type, Ecore_Wl2_Device_Type dev
992 ev->dev = efl_ref(dev); 992 ev->dev = efl_ref(dev);
993 ev->type = device_type; 993 ev->type = device_type;
994 ev->seat_id = id; 994 ev->seat_id = id;
995 ev->window_id = ee->prop.window; 995 ev->window = (Ecore_Wl2_Window *)ee->prop.window;
996 996
997 ecore_event_add(event_type, ev, 997 ecore_event_add(event_type, ev,
998 _ecore_evas_wl_common_cb_device_event_free, dev); 998 _ecore_evas_wl_common_cb_device_event_free, dev);
@@ -1265,10 +1265,10 @@ _ecore_evas_wl_common_cb_iconify_state_change(void *data EINA_UNUSED, int type E
1265 Ecore_Wl2_Event_Window_Iconify_State_Change *ev; 1265 Ecore_Wl2_Event_Window_Iconify_State_Change *ev;
1266 1266
1267 ev = event; 1267 ev = event;
1268 ee = ecore_event_window_match(ev->win); 1268 ee = ecore_event_window_match((Ecore_Window)ev->win);
1269 if (!ee) return ECORE_CALLBACK_PASS_ON; 1269 if (!ee) return ECORE_CALLBACK_PASS_ON;
1270 if (!ev->force) return ECORE_CALLBACK_PASS_ON; 1270 if (!ev->force) return ECORE_CALLBACK_PASS_ON;
1271 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; 1271 if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
1272 1272
1273 if (ee->prop.iconified == ev->iconified) 1273 if (ee->prop.iconified == ev->iconified)
1274 return ECORE_CALLBACK_PASS_ON; 1274 return ECORE_CALLBACK_PASS_ON;
@@ -2429,7 +2429,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
2429}; 2429};
2430 2430
2431Ecore_Evas * 2431Ecore_Evas *
2432_ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name) 2432_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name)
2433{ 2433{
2434 Ecore_Wl2_Display *ewd; 2434 Ecore_Wl2_Display *ewd;
2435 Ecore_Wl2_Window *p = NULL; 2435 Ecore_Wl2_Window *p = NULL;
@@ -2519,7 +2519,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2519 wdata->display = ewd; 2519 wdata->display = ewd;
2520 2520
2521 wdata->win = ecore_wl2_window_new(ewd, p, x, y, w, h); 2521 wdata->win = ecore_wl2_window_new(ewd, p, x, y, w, h);
2522 ee->prop.window = ecore_wl2_window_id_get(wdata->win); 2522 ee->prop.window = (Ecore_Window)wdata->win;
2523 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win); 2523 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
2524 ecore_evas_aux_hint_add(ee, "wm.policy.win.msg.use", "1"); 2524 ecore_evas_aux_hint_add(ee, "wm.policy.win.msg.use", "1");
2525 2525
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
index d75ad3e8ab..217096f275 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
@@ -95,6 +95,6 @@ struct _Ecore_Evas_Engine_Wl_Data
95 * @see ecore_evas_wayland_shm_new() 95 * @see ecore_evas_wayland_shm_new()
96 * @see ecore_evas_wayland_egl_new() 96 * @see ecore_evas_wayland_egl_new()
97 */ 97 */
98Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name); 98Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name);
99 99
100#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */ 100#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index 4a90e2bc64..8dc905f22d 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -634,8 +634,8 @@ text_input_keysym(void *data,
634 strcpy((char *)e->key, key); 634 strcpy((char *)e->key, key);
635 strcpy((char *)e->string, string); 635 strcpy((char *)e->string, string);
636 636
637 e->window = ecore_wl2_window_id_get(imcontext->window); 637 e->window = (Ecore_Window)imcontext->window;
638 e->event_window = ecore_wl2_window_id_get(imcontext->window); 638 e->event_window = (Ecore_Window)imcontext->window;
639 e->timestamp = time; 639 e->timestamp = time;
640 640
641 e->modifiers = 0; 641 e->modifiers = 0;