{
Ecore_Wl2_Window *win = (Ecore_Wl2_Window *)data;
int rot = 0;
+ Ecore_Wl2_Event_Window_Rotation *ev = NULL;
EINA_SAFETY_ON_NULL_RETURN(win);
- EINA_SAFETY_ON_NULL_RETURN(win->cb_rot_changed);
-
- win->wm_rot.serial = serial;
switch (angle)
{
default: rot = 0; break;
}
- ecore_wl2_window_rotation_set(win, rot);
+ if (win->cb_rot_changed)
+ {
+ win->wm_rot.serial = serial;
+
+ ecore_wl2_window_rotation_set(win, rot);
+ win->cb_rot_changed(win, rot, 0, width, height, win->cb_rot_changed_data);
+ }
+
+ if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation)))) return;
+
+ win->wm_rot.serial = serial;
- win->cb_rot_changed(win, rot, 0, width, height, win->cb_rot_changed_data);
+ ev->win = win->id;
+ ev->w = width;
+ ev->h = height;
+ ev->angle = rot;
+ ev->resize = EINA_TRUE;
+
+ ecore_event_add(ECORE_WL2_EVENT_WINDOW_ROTATE, ev, NULL, NULL);
}
static const struct tizen_rotation_listener _ecore_tizen_rotation_listener =