forked from enlightenment/efl
ecore-evas-wayland: Fix setting rotation during async render
If we are in async render when a call to set rotation happens, we should not be setting the engine info->rotation until we have actually handled the rotation. Old code here would set delayed.rotation on the ecore_evas itself, but then it would tell the engine to rotate. What we actually want here is If in async render, set the delayed rotation property and let render_updates deal with any delayed setting. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
b16c961680
commit
60c7891598
|
@ -346,11 +346,20 @@ _mouse_move_dispatch(Ecore_Evas *ee)
|
||||||
static void
|
static void
|
||||||
_rotation_do(Ecore_Evas *ee, int rotation, int resize)
|
_rotation_do(Ecore_Evas *ee, int rotation, int resize)
|
||||||
{
|
{
|
||||||
|
Evas_Engine_Info_Wayland *einfo;
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
int rot_dif;
|
int rot_dif;
|
||||||
|
|
||||||
wdata = ee->engine.data;
|
wdata = ee->engine.data;
|
||||||
|
|
||||||
|
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
|
||||||
|
if (einfo)
|
||||||
|
{
|
||||||
|
einfo->info.rotation = rotation;
|
||||||
|
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
||||||
|
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
||||||
|
}
|
||||||
|
|
||||||
/* calculate difference in rotation */
|
/* calculate difference in rotation */
|
||||||
rot_dif = ee->rotation - rotation;
|
rot_dif = ee->rotation - rotation;
|
||||||
if (rot_dif < 0) rot_dif = -rot_dif;
|
if (rot_dif < 0) rot_dif = -rot_dif;
|
||||||
|
@ -1914,8 +1923,6 @@ _ecore_evas_wl_common_transparent_set(Ecore_Evas *ee, int transparent)
|
||||||
void
|
void
|
||||||
_ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
_ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Wayland *einfo;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
if (ee->rotation == rotation) return;
|
if (ee->rotation == rotation) return;
|
||||||
|
@ -1928,14 +1935,6 @@ _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_rotation_do(ee, rotation, resize);
|
_rotation_do(ee, rotation, resize);
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
|
|
||||||
if (!einfo) return;
|
|
||||||
|
|
||||||
einfo->info.rotation = rotation;
|
|
||||||
|
|
||||||
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
|
||||||
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue