From be452d83c998240d8a64fa94de2183eea183f88e Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 16 Aug 2012 08:03:20 +0000 Subject: [PATCH] Ecore_Evas (wayland): Do not allow windows to be resized below their desired min/max properties. Fixes ticket #1244 SVN revision: 75308 --- legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c | 5 +++++ legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c index 391eab7..0253ded 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -1008,6 +1008,11 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v nh = ev->h - fh; } + if (ee->prop.min.w > nw) nw = ee->prop.min.w; + else if (nw > ee->prop.max.w) nw = ee->prop.max.w; + if (ee->prop.min.h > nh) nh = ee->prop.min.h; + else if (nh > ee->prop.max.h) nh = ee->prop.max.h; + if ((ee->w != nw) || (ee->h != nh)) { ee->req.w = nw; diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c index 0b3ade4..8ef3335 100644 --- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c +++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c @@ -1185,6 +1185,11 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v nh = ev->h - fh; } + if (ee->prop.min.w > nw) nw = ee->prop.min.w; + else if (nw > ee->prop.max.w) nw = ee->prop.max.w; + if (ee->prop.min.h > nh) nh = ee->prop.min.h; + else if (nh > ee->prop.max.h) nh = ee->prop.max.h; + if ((ee->w != nw) || (ee->h != nh)) { ee->req.w = nw; -- 2.7.4