discomfitor pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=54859be862a3c84c1d780f8551db0cba6a135f3a
commit 54859be862a3c84c1d780f8551db0cba6a135f3a Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Aug 4 16:11:00 2017 -0400 wayland: fix min/max size setting also don't set arbitrary hints on init @fix --- src/lib/ecore_wl2/ecore_wl2_private.h | 2 ++ src/lib/ecore_wl2/ecore_wl2_window.c | 4 ++-- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 1055d7a88b..3569db9f39 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -170,6 +170,8 @@ struct _Ecore_Wl2_Window uint32_t configure_serial; void (*configure_ack)(struct xdg_surface *surface, uint32_t serial); void (*zxdg_configure_ack)(struct zxdg_surface_v6 *surface, uint32_t serial); + void (*zxdg_set_min_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h); + void (*zxdg_set_max_size)(struct zxdg_toplevel_v6 *toplevel, int32_t w, int32_t h); Eina_Rectangle saved; Eina_Rectangle geometry; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index ba7f4e75d6..78f6129af0 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -459,8 +459,8 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window) if (window->class) zxdg_toplevel_v6_set_app_id(window->zxdg_toplevel, window->class); - zxdg_toplevel_v6_set_min_size(window->zxdg_toplevel, 1, 1); - zxdg_toplevel_v6_set_max_size(window->zxdg_toplevel, 32767, 32767); + window->zxdg_set_min_size = zxdg_toplevel_v6_set_min_size; + window->zxdg_set_max_size = zxdg_toplevel_v6_set_max_size; window->zxdg_configure_ack = zxdg_surface_v6_ack_configure; _ecore_wl2_window_type_set(window); 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 df0a6bafe1..0bf78dd7b2 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 @@ -1434,27 +1434,34 @@ _ecore_evas_wl_common_name_class_set(Ecore_Evas *ee, const char *n, const char * static void _ecore_evas_wl_common_size_min_set(Ecore_Evas *ee, int w, int h) { + Ecore_Evas_Engine_Wl_Data *wdata; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; + if (w < 0) w = 0; if (h < 0) h = 0; if ((ee->prop.min.w == w) && (ee->prop.min.h == h)) return; ee->prop.min.w = w; ee->prop.min.h = h; + wdata = ee->engine.data; + if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel) + wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, w, h); } static void _ecore_evas_wl_common_size_max_set(Ecore_Evas *ee, int w, int h) { + Ecore_Evas_Engine_Wl_Data *wdata; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (w < 0) w = 0; - if (h < 0) h = 0; if ((ee->prop.max.w == w) && (ee->prop.max.h == h)) return; ee->prop.max.w = w; ee->prop.max.h = h; + wdata = ee->engine.data; + if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel) + wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, w, h); } static void --