forked from enlightenment/efl
ecore_evas_wayland: Make resize code common
Brings resize code into the common implementation - there is a functional change. There appears to have been a bug in the egl resize where it used the same w, h order for portrait evases as for landscape. This was fixed in shm. I've used the shm variant for the common code.
This commit is contained in:
parent
b23797c55a
commit
4260d5d3a2
|
@ -1790,21 +1790,32 @@ _ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee EINA_UNUSED, int *xdpi
|
||||||
if (ydpi) *ydpi = dpi;
|
if (ydpi) *ydpi = dpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_wayland_resize_edge_set(Ecore_Evas *ee, int edge)
|
||||||
|
{
|
||||||
|
Evas_Engine_Info_Wayland *einfo;
|
||||||
|
|
||||||
|
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
||||||
|
einfo->info.edges = edge;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
_ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
||||||
{
|
{
|
||||||
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
if (!ee) return;
|
if (!ee) return;
|
||||||
if (!strcmp(ee->driver, "wayland_shm"))
|
wdata = ee->engine.data;
|
||||||
|
if (wdata->win)
|
||||||
{
|
{
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
_ecore_evas_wayland_resize_edge_set(ee, location);
|
||||||
_ecore_evas_wayland_shm_resize(ee, location);
|
|
||||||
#endif
|
if (ECORE_EVAS_PORTRAIT(ee))
|
||||||
}
|
ecore_wl2_window_resize(wdata->win, ee->w, ee->h, location);
|
||||||
else if (!strcmp(ee->driver, "wayland_egl"))
|
else
|
||||||
{
|
ecore_wl2_window_resize(wdata->win, ee->h, ee->w, location);
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
|
||||||
_ecore_evas_wayland_egl_resize(ee, location);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -442,33 +442,4 @@ conn_err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
|
||||||
{
|
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
if (!ee) return;
|
|
||||||
wdata = ee->engine.data;
|
|
||||||
if (wdata->win)
|
|
||||||
{
|
|
||||||
_ecore_evas_wayland_egl_resize_edge_set(ee, location);
|
|
||||||
|
|
||||||
if (ECORE_EVAS_PORTRAIT(ee))
|
|
||||||
ecore_wl2_window_resize(wdata->win, ee->w, ee->h, location);
|
|
||||||
else
|
|
||||||
ecore_wl2_window_resize(wdata->win, ee->w, ee->h, location);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_ecore_evas_wayland_egl_resize_edge_set(Ecore_Evas *ee, int edge)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_Wayland *einfo;
|
|
||||||
|
|
||||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
|
||||||
einfo->info.edges = edge;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -110,14 +110,4 @@ void _ecore_evas_wl_common_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, E
|
||||||
|
|
||||||
extern Eina_List *ee_list;
|
extern Eina_List *ee_list;
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
|
||||||
void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
|
|
||||||
void _ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
|
||||||
void _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location);
|
|
||||||
void _ecore_evas_wayland_egl_resize_edge_set(Ecore_Evas *ee, int edge);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
|
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
|
||||||
|
|
|
@ -371,33 +371,4 @@ conn_err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
|
|
||||||
{
|
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
if (!ee) return;
|
|
||||||
wdata = ee->engine.data;
|
|
||||||
if (wdata->win)
|
|
||||||
{
|
|
||||||
_ecore_evas_wayland_shm_resize_edge_set(ee, location);
|
|
||||||
|
|
||||||
if (ECORE_EVAS_PORTRAIT(ee))
|
|
||||||
ecore_wl2_window_resize(wdata->win, ee->w, ee->h, location);
|
|
||||||
else
|
|
||||||
ecore_wl2_window_resize(wdata->win, ee->h, ee->w, location);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge)
|
|
||||||
{
|
|
||||||
Evas_Engine_Info_Wayland *einfo;
|
|
||||||
|
|
||||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
|
||||||
einfo->info.edges = edge;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue