derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4260d5d3a2aa47a24cdd5afff1fb6741ad1e8cc5
commit 4260d5d3a2aa47a24cdd5afff1fb6741ad1e8cc5 Author: Derek Foreman <[email protected]> Date: Wed Nov 2 07:41:33 2016 -0500 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. --- .../engines/wayland/ecore_evas_wayland_common.c | 31 +++++++++++++++------- .../engines/wayland/ecore_evas_wayland_egl.c | 29 -------------------- .../engines/wayland/ecore_evas_wayland_private.h | 10 ------- .../engines/wayland/ecore_evas_wayland_shm.c | 29 -------------------- 4 files changed, 21 insertions(+), 78 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 80b1ff9..260c17c 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -1791,20 +1791,31 @@ _ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee EINA_UNUSED, int *xdpi } 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 _ecore_evas_wayland_resize(Ecore_Evas *ee, int location) { + Ecore_Evas_Engine_Wl_Data *wdata; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ee) return; - if (!strcmp(ee->driver, "wayland_shm")) - { -#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM - _ecore_evas_wayland_shm_resize(ee, location); -#endif - } - else if (!strcmp(ee->driver, "wayland_egl")) + wdata = ee->engine.data; + if (wdata->win) { -#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL - _ecore_evas_wayland_egl_resize(ee, location); -#endif + _ecore_evas_wayland_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); } } diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c index 366c7d2..631e603 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c @@ -442,33 +442,4 @@ conn_err: 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 diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h index eb4a4c5..89c84a0 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h @@ -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; -#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_ */ diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 662912a..c6cdb77 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -371,33 +371,4 @@ conn_err: 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 --
