From: Doyoun Kang Date: Thu, 21 Jul 2022 09:28:57 +0000 (+0900) Subject: ecore_wl2_window: send ECORE_WL2_EVENT_WINDOW_ROTATE event in _ecore_wl_window_cb_ang... X-Git-Tag: accepted/tizen/unified/20220722.031016^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F278508%2F1;p=platform%2Fupstream%2Fefl.git ecore_wl2_window: send ECORE_WL2_EVENT_WINDOW_ROTATE event in _ecore_wl_window_cb_angle_change_with_resize We add code to send a ECORE_WL2_EVENT_WINDOW_ROTATE event in the tizen_rotation's angle_change_with_resize listener function (_ecore_wl_window_cb_angle_change_with_resize). For this, a module can do what it wants when the window is rotated. @tizen_only Change-Id: I876e3bb877b65f55f5086c8b3fb73cc533c65581 --- diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index ce98cd8..dfe2353 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -763,11 +763,9 @@ _ecore_wl_window_cb_angle_change_with_resize(void *data, struct tizen_rotation * { 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) { @@ -778,9 +776,25 @@ _ecore_wl_window_cb_angle_change_with_resize(void *data, struct tizen_rotation * 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 =