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
This commit is contained in:
Derek Foreman 2018-07-06 10:16:21 -04:00 committed by Chris Michael
parent acb125419f
commit 78f27a3eff
12 changed files with 187 additions and 214 deletions

View File

@ -90,7 +90,7 @@ typedef struct _Ecore_Wl2_Event_Global
typedef struct _Ecore_Wl2_Event_Focus_In
{
unsigned int window;
Ecore_Wl2_Window *window;
unsigned int timestamp;
Eo *dev; //The seat device
Ecore_Wl2_Display *display;
@ -98,7 +98,7 @@ typedef struct _Ecore_Wl2_Event_Focus_In
typedef struct _Ecore_Wl2_Event_Focus_Out
{
unsigned int window;
Ecore_Wl2_Window *window;
unsigned int timestamp;
Eo *dev; //The seat device
Ecore_Wl2_Display *display;
@ -106,7 +106,7 @@ typedef struct _Ecore_Wl2_Event_Focus_Out
typedef struct _Ecore_Wl2_Event_Dnd_Enter
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
Ecore_Wl2_Offer *offer;
int x, y;
unsigned int seat;
@ -115,7 +115,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Enter
typedef struct _Ecore_Wl2_Event_Dnd_Leave
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
Ecore_Wl2_Offer *offer;
unsigned int seat;
Ecore_Wl2_Display *display;
@ -123,7 +123,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Leave
typedef struct _Ecore_Wl2_Event_Dnd_Motion
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
Ecore_Wl2_Offer *offer;
int x, y;
unsigned int seat;
@ -132,7 +132,7 @@ typedef struct _Ecore_Wl2_Event_Dnd_Motion
typedef struct _Ecore_Wl2_Event_Dnd_Drop
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
int x, y;
Ecore_Wl2_Offer *offer;
unsigned int seat;
@ -141,14 +141,14 @@ typedef struct _Ecore_Wl2_Event_Dnd_Drop
typedef struct _Ecore_Wl2_Event_Dnd_End
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
unsigned int seat;
Ecore_Wl2_Display *display;
} Ecore_Wl2_Event_Dnd_End;
struct _Ecore_Wl2_Event_Data_Source_Event
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
Ecore_Wl2_Drag_Action action;
unsigned int seat;
uint32_t serial;
@ -157,7 +157,7 @@ struct _Ecore_Wl2_Event_Data_Source_Event
typedef struct Ecore_Wl2_Event_Data_Source_End
{
unsigned int win, source;
Ecore_Wl2_Window *win, *source;
Ecore_Wl2_Drag_Action action;
unsigned int seat;
uint32_t serial;
@ -216,7 +216,7 @@ typedef enum
typedef struct _Ecore_Wl2_Event_Device
{
Eo *dev;
int window_id;
Ecore_Wl2_Window *window;
unsigned int seat_id;
Ecore_Wl2_Device_Type type;
} Ecore_Wl2_Event_Device;
@ -236,14 +236,15 @@ typedef enum
typedef struct _Ecore_Wl2_Event_Window_Configure
{
unsigned int win, event_win, edges;
Ecore_Wl2_Window *win, *event_win;
unsigned int edges;
unsigned int w, h;
unsigned int states;
} Ecore_Wl2_Event_Window_Configure;
typedef struct _Ecore_Wl2_Event_Window_Configure_Complete
{
unsigned int win;
Ecore_Wl2_Window *win;
} Ecore_Wl2_Event_Window_Configure_Complete;
typedef struct _Ecore_Wl2_Event_Input_Keymap_Changed
@ -281,7 +282,7 @@ typedef struct _Ecore_Wl2_Event_Output_Transform
typedef struct _Ecore_Wl2_Event_Window_Rotation
{
unsigned int win;
Ecore_Wl2_Window *win;
int rotation, w, h, angle;
Eina_Bool resize : 1;
} Ecore_Wl2_Event_Window_Rotation;
@ -292,35 +293,35 @@ typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_
typedef struct _Ecore_Wl2_Event_Window_Show
{
unsigned int win;
unsigned int parent_win;
unsigned int event_win;
Ecore_Wl2_Window *win;
Ecore_Wl2_Window *parent_win;
Ecore_Wl2_Window *event_win;
} Ecore_Wl2_Event_Window_Show;
typedef struct _Ecore_Wl2_Event_Window_Hide
{
unsigned int win;
unsigned int parent_win;
unsigned int event_win;
Ecore_Wl2_Window *win;
Ecore_Wl2_Window *parent_win;
Ecore_Wl2_Window *event_win;
} Ecore_Wl2_Event_Window_Hide;
typedef struct _Ecore_Wl2_Event_Window_Activate
{
unsigned int win;
unsigned int parent_win;
unsigned int event_win;
Ecore_Wl2_Window *win;
Ecore_Wl2_Window *parent_win;
Ecore_Wl2_Window *event_win;
} Ecore_Wl2_Event_Window_Activate;
typedef struct _Ecore_Wl2_Event_Window_Deactivate
{
unsigned int win;
unsigned int parent_win;
unsigned int event_win;
Ecore_Wl2_Window *win;
Ecore_Wl2_Window *parent_win;
Ecore_Wl2_Window *event_win;
} Ecore_Wl2_Event_Window_Deactivate;
typedef struct _Ecore_Wl2_Event_Window_Iconify_State_Change
{
unsigned int win;
Ecore_Wl2_Window *win;
unsigned int iconified;
unsigned int force;
} Ecore_Wl2_Event_Window_Iconify_State_Change;
@ -342,20 +343,20 @@ typedef enum _Ecore_Wl2_Window_Type
typedef struct _Ecore_Wl2_Event_Aux_Hint_Allowed
{
unsigned int win;
Ecore_Wl2_Window *win;
int id;
Ecore_Wl2_Display *display;
} Ecore_Wl2_Event_Aux_Hint_Allowed;
typedef struct _Ecore_Wl2_Event_Aux_Hint_Supported
{
unsigned int win;
Ecore_Wl2_Window *win;
Ecore_Wl2_Display *display;
} Ecore_Wl2_Event_Aux_Hint_Supported;
typedef struct Ecore_Wl2_Event_Aux_Message
{
unsigned int win;
Ecore_Wl2_Window *win;
Eina_Stringshare *key;
Eina_Stringshare *val;
Eina_List *options;
@ -364,7 +365,7 @@ typedef struct Ecore_Wl2_Event_Aux_Message
typedef struct Ecore_Wl2_Event_Window_Offscreen
{
unsigned int win;
Ecore_Wl2_Window *win;
} Ecore_Wl2_Event_Window_Offscreen;
typedef 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
* @ingroup Ecore_Wl2_Display_Group
* @since 1.17
*/
EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id);
EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, uintptr_t id);
/**
* Retrieves the Wayland Registry used for the current Wayland display.
@ -743,18 +744,6 @@ EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display);
*/
EAPI Ecore_Wl2_Window *ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h);
/**
* Get the window id associated with an Ecore_Wl2_Window
*
* @param window The Ecore_Wl2_Window of which to retrieve the window id
*
* @return The id associated with this window
*
* @ingroup Ecore_Wl2_Window_Group
* @since 1.17
*/
EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window);
/**
* Get the wl_surface which belongs to this window
*

View File

@ -145,7 +145,7 @@ _aux_hints_supported_aux_hints(void *data, struct efl_aux_hints *aux_hints EINA_
}
if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Supported)))) return;
ev->win = win->id;
ev->win = win;
ev->display = ewd;
ewd->refs++;
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
if (!win) return;
if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Aux_Hint_Allowed)))) return;
ev->win = win->id;
ev->win = win;
ev->id = id;
ev->display = ewd;
ewd->refs++;
@ -212,7 +212,7 @@ _aux_hints_aux_message(void *data, struct efl_aux_hints *aux_hints EINA_UNUSED,
}
}
ev->win = win->id;
ev->win = win;
ev->key = eina_stringshare_add(key);
ev->val = eina_stringshare_add(val);
ev->options = opt_list;
@ -1084,16 +1084,9 @@ ecore_wl2_display_screen_size_get(Ecore_Wl2_Display *display, int *w, int *h)
}
EAPI Ecore_Wl2_Window *
ecore_wl2_display_window_find(Ecore_Wl2_Display *display, unsigned int id)
ecore_wl2_display_window_find(Ecore_Wl2_Display *display EINA_UNUSED, uintptr_t id)
{
Ecore_Wl2_Window *window;
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
EINA_INLIST_FOREACH(display->windows, window)
if (window->id == (int)id) return window;
return NULL;
return (Ecore_Wl2_Window *)id;
}
EAPI struct wl_registry *

View File

@ -53,21 +53,21 @@ struct _Ecore_Wl2_Offer
uint32_t serial;
Eina_List *reads;
int ref;
unsigned int window_id;
Ecore_Wl2_Window *window;
Eina_Bool proxied : 1;
};
static int
Ecore_Wl2_Window *
_win_id_get(Ecore_Wl2_Input *input)
{
int win = 0;
Ecore_Wl2_Window *win = NULL;
if (input->focus.pointer)
win = input->focus.pointer->id;
win = input->focus.pointer;
else if (input->focus.prev_pointer)
win = input->focus.prev_pointer->id;
win = input->focus.prev_pointer;
else if (input->focus.keyboard)
win = input->focus.keyboard->id;
win = input->focus.keyboard;
return win;
}
@ -149,7 +149,7 @@ static void
event_fill(struct _Ecore_Wl2_Event_Data_Source_Event *ev, Ecore_Wl2_Input *input)
{
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->source = input->focus.keyboard;
ev->win = _win_id_get(input);
ev->action = input->data.drag.action;
@ -256,7 +256,7 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
if (input->drag.offer)
{
input->drag.offer->serial = serial;
input->drag.offer->window_id = window->id;
input->drag.offer->window = window;
if (input->display->wl.data_device_manager_version >=
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
else input->drag.offer = NULL;
input->drag.enter_serial = serial;
input->drag.window_id = window->id;
input->drag.window = window;
ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Enter));
if (!ev) return;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->win = input->drag.window_id;
ev->source = input->focus.keyboard;
ev->win = input->drag.window;
ev->x = x;
ev->y = y;
@ -311,9 +311,9 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
if (!ev) return;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->source = input->focus.keyboard;
ev->win = input->drag.window_id;
ev->win = input->drag.window;
ev->offer = input->drag.offer;
if (ev->offer)
ev->offer->ref++;
@ -321,7 +321,7 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
ev->display = input->display;
ev->display->refs++;
input->drag.window_id = 0;
input->drag.window = NULL;
input->drag.enter_serial = 0;
input->drag.offer = NULL;
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)
input->drag.offer->serial = serial;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->source = input->focus.keyboard;
ev->win = input->drag.window_id;
ev->win = input->drag.window;
ev->x = x;
ev->y = y;
ev->offer = input->drag.offer;
@ -364,9 +364,9 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
if (!ev) return;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->source = input->focus.keyboard;
ev->win = input->drag.window_id;
ev->win = input->drag.window;
ev->x = input->pointer.sx;
ev->y = input->pointer.sy;
ev->offer = input->drag.offer;
@ -524,7 +524,7 @@ ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input)
if (!ev) return;
if (input->focus.keyboard)
ev->source = input->focus.keyboard->id;
ev->source = input->focus.keyboard;
ev->win = _win_id_get(input);

View File

@ -47,10 +47,10 @@ typedef struct _Ecore_Wl2_Mouse_Down_Info
{
EINA_INLIST;
int device, sx, sy;
int last_win;
int last_last_win;
int last_event_win;
int last_last_event_win;
Ecore_Wl2_Window *last_win;
Ecore_Wl2_Window *last_last_win;
Ecore_Wl2_Window *last_event_win;
Ecore_Wl2_Window *last_last_event_win;
unsigned int last_time;
unsigned int last_last_time;
Eina_Bool double_click : 1;
@ -82,14 +82,14 @@ _ecore_wl2_input_mouse_down_info_get(int device)
}
static Ecore_Wl2_Input_Devices *
_ecore_wl2_devices_get(const Ecore_Wl2_Input *input, int window_id)
_ecore_wl2_devices_get(const Ecore_Wl2_Input *input, const Ecore_Wl2_Window *window)
{
Ecore_Wl2_Input_Devices *devices;
Eina_List *l;
EINA_LIST_FOREACH(input->devices_list, l, devices)
{
if (devices->window_id == window_id)
if (devices->window == window)
return devices;
}
@ -97,11 +97,11 @@ _ecore_wl2_devices_get(const Ecore_Wl2_Input *input, int window_id)
}
static Eo *
_ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int window_id)
_ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
{
Ecore_Wl2_Input_Devices *devices;
devices = _ecore_wl2_devices_get(input, window_id);
devices = _ecore_wl2_devices_get(input, window);
if (devices && devices->pointer_dev)
return efl_ref(devices->pointer_dev);
@ -109,11 +109,11 @@ _ecore_wl2_mouse_dev_get(Ecore_Wl2_Input *input, int window_id)
}
static Eo *
_ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, int window_id)
_ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
{
Ecore_Wl2_Input_Devices *devices;
devices = _ecore_wl2_devices_get(input, window_id);
devices = _ecore_wl2_devices_get(input, window);
if (devices && devices->touch_dev)
return efl_ref(devices->touch_dev);
@ -121,11 +121,11 @@ _ecore_wl2_touch_dev_get(Ecore_Wl2_Input *input, int window_id)
}
static Eo *
_ecore_wl2_seat_dev_get(Ecore_Wl2_Input *input, int window_id)
_ecore_wl2_seat_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
{
Ecore_Wl2_Input_Devices *devices;
devices = _ecore_wl2_devices_get(input, window_id);
devices = _ecore_wl2_devices_get(input, window);
if (devices)
return efl_ref(devices->seat_dev);
@ -150,11 +150,11 @@ _ecore_wl2_input_mouse_in_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window)
ev->x = input->pointer.sx;
ev->y = input->pointer.sy;
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
ev->timestamp = input->timestamp;
ev->modifiers = input->keyboard.modifiers;
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
ev->dev = _ecore_wl2_mouse_dev_get(input, window);
ecore_event_add(ECORE_EVENT_MOUSE_IN, ev, _input_event_cb_free, ev->dev);
}
@ -169,11 +169,11 @@ _ecore_wl2_input_mouse_out_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window
ev->x = input->pointer.sx;
ev->y = input->pointer.sy;
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
ev->timestamp = input->timestamp;
ev->modifiers = input->keyboard.modifiers;
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
ev->dev = _ecore_wl2_mouse_dev_get(input, window);
ecore_event_add(ECORE_EVENT_MOUSE_OUT, ev, _input_event_cb_free, ev->dev);
}
@ -187,8 +187,8 @@ _ecore_wl2_input_mouse_move_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!ev) return;
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
ev->timestamp = input->timestamp;
ev->x = input->pointer.sx;
ev->y = input->pointer.sy;
@ -207,9 +207,9 @@ _ecore_wl2_input_mouse_move_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
ev->multi.root.y = input->pointer.sy;
if ((input->focus.touch) && (input->focus.touch == window))
ev->dev = _ecore_wl2_touch_dev_get(input, window->id);
ev->dev = _ecore_wl2_touch_dev_get(input, window);
else if ((input->focus.pointer) && (input->focus.pointer == window))
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
ev->dev = _ecore_wl2_mouse_dev_get(input, window);
info = _ecore_wl2_input_mouse_down_info_get(device);
if (info)
@ -248,27 +248,27 @@ _ecore_wl2_input_mouse_wheel_send(Ecore_Wl2_Input *input, unsigned int axis, int
if (input->grab.window)
{
ev->window = input->grab.window->id;
ev->event_window = input->grab.window->id;
ev->window = (Ecore_Window)input->grab.window;
ev->event_window = (Ecore_Window)input->grab.window;
}
else if (input->focus.pointer)
{
ev->window = input->focus.pointer->id;
ev->event_window = input->focus.pointer->id;
ev->dev = _ecore_wl2_mouse_dev_get(input, input->focus.pointer->id);
ev->window = (Ecore_Window)input->focus.pointer;
ev->event_window = (Ecore_Window)input->focus.pointer;
ev->dev = _ecore_wl2_mouse_dev_get(input, input->focus.pointer);
}
else if (input->focus.touch)
{
ev->window = input->focus.touch->id;
ev->event_window = input->focus.touch->id;
ev->dev = _ecore_wl2_touch_dev_get(input, input->focus.touch->id);
ev->window = (Ecore_Window)input->focus.touch;
ev->event_window = (Ecore_Window)input->focus.touch;
ev->dev = _ecore_wl2_touch_dev_get(input, input->focus.touch);
}
if (!ev->dev)
{
ev->dev = _ecore_wl2_mouse_dev_get(input, ev->window);
ev->dev = _ecore_wl2_mouse_dev_get(input, (Ecore_Wl2_Window *)ev->window);
if (!ev->dev)
ev->dev = _ecore_wl2_touch_dev_get(input, ev->window);
ev->dev = _ecore_wl2_touch_dev_get(input, (Ecore_Wl2_Window *)ev->window);
}
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
}
if (((int)(timestamp - info->last_time) <= (int)(1000 * 0.25)) &&
((window) && (window->id == info->last_win) &&
(window->id == info->last_event_win)))
((window) && (window == info->last_win) &&
(window == info->last_event_win)))
{
ev->double_click = 1;
info->double_click = EINA_TRUE;
@ -332,10 +332,10 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
if (((int)(timestamp - info->last_last_time) <=
(int)(2 * 1000 * 0.25)) &&
((window) && (window->id == info->last_win) &&
(window->id == info->last_last_win) &&
(window->id == info->last_event_win) &&
(window->id == info->last_last_event_win)))
((window) && (window == info->last_win) &&
(window == info->last_last_win) &&
(window == info->last_event_win) &&
(window == info->last_last_event_win)))
{
ev->triple_click = 1;
info->triple_click = EINA_TRUE;
@ -357,13 +357,13 @@ _ecore_wl2_input_mouse_down_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *windo
if (window)
{
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
if ((input->focus.touch) && (input->focus.touch == window))
ev->dev = _ecore_wl2_touch_dev_get(input, window->id);
ev->dev = _ecore_wl2_touch_dev_get(input, window);
else if ((input->focus.pointer) && (input->focus.pointer == window))
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
ev->dev = _ecore_wl2_mouse_dev_get(input, window);
}
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
if ((info) && (!info->triple_click))
{
info->last_last_win = info->last_win;
info->last_win = ev->window;
info->last_win = (Ecore_Wl2_Window *)ev->window;
info->last_last_event_win = info->last_event_win;
info->last_event_win = ev->window;
info->last_event_win = (Ecore_Wl2_Window *)ev->window;
info->last_last_time = info->last_time;
info->last_time = timestamp;
}
@ -433,13 +433,13 @@ _ecore_wl2_input_mouse_up_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window,
ev->multi.root.x = input->pointer.sx;
ev->multi.root.y = input->pointer.sy;
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
if ((input->focus.touch) && (input->focus.touch == window))
ev->dev = _ecore_wl2_touch_dev_get(input, window->id);
ev->dev = _ecore_wl2_touch_dev_get(input, window);
else if ((input->focus.pointer) && (input->focus.pointer == window))
ev->dev = _ecore_wl2_mouse_dev_get(input, window->id);
ev->dev = _ecore_wl2_mouse_dev_get(input, window);
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev,
_input_event_cb_free, ev->dev);
@ -464,8 +464,8 @@ _ecore_wl2_input_focus_in_send(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input)
if (!ev) return;
ev->timestamp = input->timestamp;
ev->window = window->id;
ev->dev = _ecore_wl2_seat_dev_get(input, window->id);
ev->window = window;
ev->dev = _ecore_wl2_seat_dev_get(input, window);
ev->display = input->display;
ev->display->refs++;
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
if (!ev) return;
ev->timestamp = input->timestamp;
ev->window = window->id;
ev->dev = _ecore_wl2_seat_dev_get(input, window->id);
ev->window = window;
ev->dev = _ecore_wl2_seat_dev_get(input, window);
ev->display = input->display;
ev->display->refs++;
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
}
static Eo *
_ecore_wl2_keyboard_dev_get(Ecore_Wl2_Input *input, int window_id)
_ecore_wl2_keyboard_dev_get(Ecore_Wl2_Input *input, Ecore_Wl2_Window * window)
{
Ecore_Wl2_Input_Devices *devices;
devices = _ecore_wl2_devices_get(input, window_id);
devices = _ecore_wl2_devices_get(input, window);
if (devices && devices->keyboard_dev)
return efl_ref(devices->keyboard_dev);
@ -649,12 +649,12 @@ _ecore_wl2_input_key_send(Ecore_Wl2_Input *input, Ecore_Wl2_Window *window, xkb_
strcpy((char *)ev->key, key);
if (comp_len) strcpy((char *)ev->compose, compose);
ev->window = window->id;
ev->event_window = window->id;
ev->window = (Ecore_Window)window;
ev->event_window = (Ecore_Window)window;
ev->timestamp = timestamp;
ev->modifiers = input->keyboard.modifiers;
ev->keycode = code;
ev->dev = _ecore_wl2_keyboard_dev_get(input, window->id);
ev->dev = _ecore_wl2_keyboard_dev_get(input, window);
/* DBG("Emitting Key event (%s,%s,%s,%s)\n", ev->keyname, ev->key, ev->compose, ev->string); */
@ -1535,7 +1535,7 @@ _ecore_wl2_cb_device_event(void *data, int type, void *event)
EINA_LIST_FOREACH(input->devices_list, l, devs)
{
if (devs->window_id == ev->window_id)
if (devs->window == ev->window)
{
devices = devs;
break;
@ -1550,7 +1550,7 @@ _ecore_wl2_cb_device_event(void *data, int type, void *event)
EINA_SAFETY_ON_NULL_RETURN_VAL(devices, ECORE_CALLBACK_PASS_ON);
input->devices_list =
eina_list_append(input->devices_list, devices);
devices->window_id = ev->window_id;
devices->window = ev->window;
}
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)
}
EINA_LIST_FOREACH_SAFE(input->devices_list, l, l_next, devices)
if (devices->window_id == window->id)
if (devices->window == window)
{
_ecore_wl2_devices_free(devices);
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
EINA_SAFETY_ON_NULL_RETURN_VAL(input, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
devices = _ecore_wl2_devices_get(input, window->id);
devices = _ecore_wl2_devices_get(input, window);
return devices ? devices->seat_dev : NULL;
}

View File

@ -69,7 +69,7 @@ typedef struct _Ecore_Wl2_Input_Devices
Eo *keyboard_dev;
Eo *touch_dev;
Eo *seat_dev;
int window_id;
Ecore_Wl2_Window *window;
} Ecore_Wl2_Input_Devices;
struct _Ecore_Wl2_Display
@ -173,7 +173,7 @@ struct _Ecore_Wl2_Window
Ecore_Wl2_Surface *wl2_surface;
int id, rotation, surface_id;
int rotation, surface_id;
const char *title;
const char *class;
const char *role;
@ -509,7 +509,7 @@ struct _Ecore_Wl2_Input
{
Ecore_Wl2_Offer *offer;
uint32_t enter_serial;
Ecore_Window window_id;
Ecore_Wl2_Window *window;
} drag, selection;
unsigned int seat_version;
@ -523,7 +523,7 @@ struct _Ecore_Wl2_Input
typedef struct Ecore_Wl2_Event_Window_WWW
{
unsigned int window;
Ecore_Wl2_Window *window;
int x_rel;
int y_rel;
uint32_t timestamp;
@ -531,7 +531,7 @@ typedef struct Ecore_Wl2_Event_Window_WWW
typedef struct Ecore_Wl2_Event_Window_WWW_Drag
{
unsigned int window;
Ecore_Wl2_Window *window;
Eina_Bool dragging;
} Ecore_Wl2_Event_Window_WWW_Drag;

View File

@ -76,7 +76,7 @@ _ecore_wl2_surface_cb_offscreen(void *data, int type EINA_UNUSED, void *event)
Ecore_Wl2_Event_Window_Offscreen *ev = event;
Ecore_Wl2_Surface *surf = data;
if (surf->wl2_win->id == (int)ev->win)
if (surf->wl2_win == ev->win)
ecore_wl2_surface_flush(surf, EINA_FALSE);
return ECORE_CALLBACK_RENEW;

View File

@ -54,10 +54,10 @@ _ecore_wl2_window_activate_send(Ecore_Wl2_Window *window)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Activate));
if (!ev) return;
ev->win = window->id;
ev->win = window;
if (window->parent)
ev->parent_win = window->parent->id;
ev->event_win = window->id;
ev->parent_win = window->parent;
ev->event_win = window;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE, ev, NULL, NULL);
}
@ -69,10 +69,10 @@ _ecore_wl2_window_deactivate_send(Ecore_Wl2_Window *window)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Deactivate));
if (!ev) return;
ev->win = window->id;
ev->win = window;
if (window->parent)
ev->parent_win = window->parent->id;
ev->event_win = window->id;
ev->parent_win = window->parent;
ev->event_win = window;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_DEACTIVATE, ev, NULL, NULL);
}
@ -84,8 +84,8 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure));
if (!ev) return;
ev->win = win->id;
ev->event_win = win->id;
ev->win = win;
ev->event_win = win;
if ((win->set_config.geometry.w == win->def_config.geometry.w) &&
(win->set_config.geometry.h == win->def_config.geometry.h))
@ -124,7 +124,7 @@ _configure_complete(Ecore_Wl2_Window *window)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure_Complete));
if (!ev) return;
ev->win = window->id;
ev->win = window;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, ev, NULL, NULL);
}
@ -139,7 +139,7 @@ _www_surface_end_drag(void *data, struct www_surface *www_surface EINA_UNUSED)
ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
EINA_SAFETY_ON_NULL_RETURN(ev);
ev->window = window->id;
ev->window = window;
ev->dragging = 0;
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)
ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW_Drag));
EINA_SAFETY_ON_NULL_RETURN(ev);
ev->window = window->id;
ev->window = window;
ev->dragging = 1;
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
ev = malloc(sizeof(Ecore_Wl2_Event_Window_WWW));
EINA_SAFETY_ON_NULL_RETURN(ev);
ev->window = window->id;
ev->window = window;
ev->x_rel = x_rel;
ev->y_rel = y_rel;
ev->timestamp = timestamp;
@ -465,7 +465,7 @@ _surface_leave(void *data, struct wl_surface *surf EINA_UNUSED, struct wl_output
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Offscreen));
if (ev)
{
ev->win = win->id;
ev->win = win;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_OFFSCREEN, ev, NULL, NULL);
}
}
@ -514,10 +514,10 @@ _ecore_wl2_window_show_send(Ecore_Wl2_Window *window)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Show));
if (!ev) return;
ev->win = window->id;
ev->win = window;
if (window->parent)
ev->parent_win = window->parent->id;
ev->event_win = window->id;
ev->parent_win = window->parent;
ev->event_win = window;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_SHOW, ev, NULL, NULL);
}
@ -529,10 +529,10 @@ _ecore_wl2_window_hide_send(Ecore_Wl2_Window *window)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Hide));
if (!ev) return;
ev->win = window->id;
ev->win = window;
if (window->parent)
ev->parent_win = window->parent->id;
ev->event_win = window->id;
ev->parent_win = window->parent;
ev->event_win = window;
ecore_event_add(ECORE_WL2_EVENT_WINDOW_HIDE, ev, NULL, NULL);
}
@ -540,7 +540,6 @@ EAPI Ecore_Wl2_Window *
ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h)
{
Ecore_Wl2_Window *win;
static int _win_id = 1;
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
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
win->display = display;
win->parent = parent;
win->id = _win_id++;
win->set_config.geometry.x = x;
win->set_config.geometry.y = y;
@ -573,13 +571,6 @@ ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x
return win;
}
EAPI int
ecore_wl2_window_id_get(Ecore_Wl2_Window *window)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1);
return window->id;
}
EAPI struct wl_surface *
ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
{
@ -1257,7 +1248,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->win = window->id;
ev->win = window;
ev->rotation = rot;
ev->w = w;
ev->h = h;
@ -1276,7 +1267,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->win = window->id;
ev->win = window;
ev->rotation = rot;
ev->w = 0;
ev->h = 0;
@ -1296,7 +1287,7 @@ ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int rot)
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request));
if (!ev) return;
ev->win = window->id;
ev->win = window;
ev->rotation = rot;
ev->w = 0;
ev->h = 0;
@ -1316,7 +1307,7 @@ ecore_wl2_window_rotation_change_done_send(Ecore_Wl2_Window *window, int rot, in
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Done));
if (!ev) return;
ev->win = window->id;
ev->win = window;
ev->rotation = rot;
ev->w = w;
ev->h = h;

View File

@ -2960,7 +2960,7 @@ _wl_sel_obj_del2(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
}
static Sel_Manager_Dropable *
_wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win)
_wl_dropable_find(Efl_Selection_Manager_Data *pd, Ecore_Wl2_Window *win)
{
Eina_List *l;
Sel_Manager_Dropable *dropable;
@ -2968,7 +2968,7 @@ _wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win)
if (!pd->drop_list) return NULL;
window = ecore_wl2_display_window_find(_elm_wl_display, win);
window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win);
if (!window) return NULL;
EINA_LIST_FOREACH(pd->drop_list, l, dropable)
@ -2979,7 +2979,7 @@ _wl_dropable_find(Efl_Selection_Manager_Data *pd, unsigned int win)
}
static Evas *
_wl_evas_get_from_win(Efl_Selection_Manager_Data *pd, unsigned int win)
_wl_evas_get_from_win(Efl_Selection_Manager_Data *pd, Ecore_Wl2_Window *win)
{
Sel_Manager_Dropable *dropable = _wl_dropable_find(pd, win);
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 *
}
static void
_wl_dropable_all_clean(Sel_Manager_Seat_Selection *seat_sel, unsigned int win)
_wl_dropable_all_clean(Sel_Manager_Seat_Selection *seat_sel, Ecore_Wl2_Window *win)
{
Eina_List *l;
Sel_Manager_Dropable *dropable;
Ecore_Wl2_Window *window;
window = ecore_wl2_display_window_find(_elm_wl_display, win);
window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win);
if (!window) return;
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)
}
}
win = ecore_wl2_display_window_find(pd->wl_display, ev->win);
win = ecore_wl2_display_window_find(pd->wl_display, (Ecore_Window)ev->win);
ecore_wl2_dnd_drag_end(_wl_seat_get(win, NULL, seat_sel->seat));
return ECORE_CALLBACK_PASS_ON;
}

View File

@ -4337,7 +4337,7 @@ _elm_win_wl_configure(void *data, int t EINA_UNUSED, void *event)
{
Ecore_Wl2_Event_Window_Configure *ev = event;
ELM_WIN_DATA_GET(data, sd);
if (ecore_wl2_window_id_get(sd->wl.win) != (int)ev->win) return ECORE_CALLBACK_RENEW;
if (sd->wl.win != ev->win) return ECORE_CALLBACK_RENEW;
if (sd->resizing && (!ev->edges)) sd->resizing = EINA_FALSE;
return ECORE_CALLBACK_RENEW;
@ -8413,14 +8413,14 @@ _elm_win_window_id_get(Efl_Ui_Win_Data *sd)
{
#if HAVE_ELEMENTARY_WL2
if (sd->wl.win)
return (Ecore_Window)ecore_wl2_window_id_get(sd->wl.win);
return (Ecore_Window)sd->wl.win;
if (sd->parent)
{
Ecore_Wl2_Window *parent;
parent = elm_win_wl_window_get(sd->parent);
if (parent)
return (Ecore_Window)ecore_wl2_window_id_get(parent);
return (Ecore_Window)parent;
}
#endif
#ifdef HAVE_ELEMENTARY_X

View File

@ -115,9 +115,9 @@ _ecore_evas_wl_common_cb_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
_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,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
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,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_focus_device_set(ee, ev->dev, EINA_TRUE);
return ECORE_CALLBACK_PASS_ON;
}
@ -174,9 +174,9 @@ _ecore_evas_wl_common_cb_focus_out(void *data EINA_UNUSED, int type EINA_UNUSED,
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_focus_device_set(ee, ev->dev, EINA_FALSE);
return ECORE_CALLBACK_PASS_ON;
}
@ -570,9 +570,9 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
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
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
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
Ecore_Wl2_Event_Aux_Message *ev;
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (eina_streq(ev->key, "stack_del"))
{
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
Ecore_Evas_Engine_Wl_Data *wdata;
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint) eina_stringshare_del(hint);
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
Ecore_Evas_Aux_Hint *aux;
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
{
@ -776,9 +776,9 @@ _ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNU
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_wl_common_rotation_set(ee, ev->rotation, ev->resize);
return ECORE_CALLBACK_PASS_ON;
}
@ -944,9 +944,9 @@ _ecore_evas_wl_common_cb_www_drag(void *d EINA_UNUSED, int t EINA_UNUSED, void *
Ecore_Evas_Engine_Wl_Data *wdata;
Ecore_Evas *ee;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
wdata->dragging = !!ev->dragging;
@ -962,9 +962,9 @@ _ecore_evas_wl_common_cb_www(void *d EINA_UNUSED, int t EINA_UNUSED, void *event
Ecore_Evas_Engine_Wl_Data *wdata;
Ecore_Evas *ee;
ee = ecore_event_window_match(ev->window);
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
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
ev->dev = efl_ref(dev);
ev->type = device_type;
ev->seat_id = id;
ev->window_id = ee->prop.window;
ev->window = (Ecore_Wl2_Window *)ee->prop.window;
ecore_event_add(event_type, ev,
_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
Ecore_Wl2_Event_Window_Iconify_State_Change *ev;
ev = event;
ee = ecore_event_window_match(ev->win);
ee = ecore_event_window_match((Ecore_Window)ev->win);
if (!ee) return ECORE_CALLBACK_PASS_ON;
if (!ev->force) return ECORE_CALLBACK_PASS_ON;
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if (ee->prop.iconified == ev->iconified)
return ECORE_CALLBACK_PASS_ON;
@ -2429,7 +2429,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
};
Ecore_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)
_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)
{
Ecore_Wl2_Display *ewd;
Ecore_Wl2_Window *p = NULL;
@ -2519,7 +2519,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
wdata->display = ewd;
wdata->win = ecore_wl2_window_new(ewd, p, x, y, w, h);
ee->prop.window = ecore_wl2_window_id_get(wdata->win);
ee->prop.window = (Ecore_Window)wdata->win;
ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
ecore_evas_aux_hint_add(ee, "wm.policy.win.msg.use", "1");

View File

@ -95,6 +95,6 @@ struct _Ecore_Evas_Engine_Wl_Data
* @see ecore_evas_wayland_shm_new()
* @see ecore_evas_wayland_egl_new()
*/
Ecore_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);
Ecore_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);
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */

View File

@ -634,8 +634,8 @@ text_input_keysym(void *data,
strcpy((char *)e->key, key);
strcpy((char *)e->string, string);
e->window = ecore_wl2_window_id_get(imcontext->window);
e->event_window = ecore_wl2_window_id_get(imcontext->window);
e->window = (Ecore_Window)imcontext->window;
e->event_window = (Ecore_Window)imcontext->window;
e->timestamp = time;
e->modifiers = 0;