From b898d3f929c9e21833196d1a41430f9760a364ee Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 1 Nov 2016 07:42:23 -0500 Subject: [PATCH] wayland ecore evas: move move_resize to common It's identical in both shm and egl variants, share it. --- .../engines/wayland/ecore_evas_wayland_common.c | 12 ++++++++++++ .../engines/wayland/ecore_evas_wayland_egl.c | 15 +-------------- .../engines/wayland/ecore_evas_wayland_private.h | 1 + .../engines/wayland/ecore_evas_wayland_shm.c | 15 +-------------- 4 files changed, 15 insertions(+), 28 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 48f03172d3..fdfcc993f7 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 @@ -991,6 +991,18 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h) } } +void +_ecore_evas_wl_common_move_resize(Ecore_Evas *ee, int x, int y, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if ((ee->x != x) || (ee->y != y)) + _ecore_evas_wl_common_move(ee, x, y); + if ((ee->w != w) || (ee->h != h)) + _ecore_evas_wl_common_resize(ee, w, h); +} + void _ecore_evas_wl_common_callback_resize_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) { 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 9880e857be..3b2ad37202 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 @@ -34,7 +34,6 @@ extern EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e); extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list); /* local function prototypes */ -static void _ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h); static void _ecore_evas_wl_show(Ecore_Evas *ee); static void _ecore_evas_wl_hide(Ecore_Evas *ee); static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); @@ -61,7 +60,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func = _ecore_evas_wl_common_move, NULL, // managed_move _ecore_evas_wl_common_resize, - _ecore_evas_wl_move_resize, + _ecore_evas_wl_common_move_resize, _ecore_evas_wl_rotation_set, NULL, // shaped_set _ecore_evas_wl_show, @@ -450,18 +449,6 @@ conn_err: return NULL; } -static void -_ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!ee) return; - if ((ee->x != x) || (ee->y != y)) - _ecore_evas_wl_common_move(ee, x, y); - if ((ee->w != w) || (ee->h != h)) - _ecore_evas_wl_common_resize(ee, w, h); -} - static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize) { 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 bea9870876..dc53701477 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 @@ -71,6 +71,7 @@ void _ecore_evas_wl_common_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ec void _ecore_evas_wl_common_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); void _ecore_evas_wl_common_move(Ecore_Evas *ee, int x, int y); void _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h); +void _ecore_evas_wl_common_move_resize(Ecore_Evas *ee, int x, int y, int w, int h); void _ecore_evas_wl_common_raise(Ecore_Evas *ee); void _ecore_evas_wl_common_title_set(Ecore_Evas *ee, const char *title); void _ecore_evas_wl_common_name_class_set(Ecore_Evas *ee, const char *n, const char *c); 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 4b3b492104..3398f19e93 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 @@ -31,7 +31,6 @@ #endif /* ! _WIN32 */ /* local function prototypes */ -static void _ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h); static void _ecore_evas_wl_show(Ecore_Evas *ee); static void _ecore_evas_wl_hide(Ecore_Evas *ee); static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); @@ -58,7 +57,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func = _ecore_evas_wl_common_move, NULL, // managed_move _ecore_evas_wl_common_resize, - _ecore_evas_wl_move_resize, + _ecore_evas_wl_common_move_resize, _ecore_evas_wl_rotation_set, NULL, // shaped_set _ecore_evas_wl_show, @@ -379,18 +378,6 @@ conn_err: return NULL; } -static void -_ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!ee) return; - if ((ee->x != x) || (ee->y != y)) - _ecore_evas_wl_common_move(ee, x, y); - if ((ee->w != w) || (ee->h != h)) - _ecore_evas_wl_common_resize(ee, w, h); -} - static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize) {