summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-01-08 09:10:21 -0500
committerChris Michael <cp.michael@samsung.com>2015-01-09 09:42:43 -0500
commit9e485439d7438517bb9ab03fc86e6e0c156b2d29 (patch)
treeea1e9ef291df3658850bd92645b93dc3747c2881 /src/modules
parentec1afd74fdaa7365ad29bbffca594bfa82aca668 (diff)
ecore-evas-wayland: Port fix of min/max size calculations to the
configure event handler Summary: This patch ports the fix for windows without a min/max size being set over to the configure event handler (which was also not taking into account the fact that Some windows may Not have a min/max property set on them. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c43
1 files changed, 28 insertions, 15 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 dfc31bcf73..76036c3b62 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
@@ -211,25 +211,33 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
211 if (!ee->prop.fullscreen) 211 if (!ee->prop.fullscreen)
212 { 212 {
213 int fw = 0, fh = 0; 213 int fw = 0, fh = 0;
214 int maxw, maxh; 214 int maxw = 0, maxh = 0;
215 int minw, minh; 215 int minw = 0, minh = 0;
216 double a; 216 double a = 0.0;
217 217
218 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh); 218 evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
219 219
220 if (ECORE_EVAS_PORTRAIT(ee)) 220 if (ECORE_EVAS_PORTRAIT(ee))
221 { 221 {
222 minw = (ee->prop.min.w + fw); 222 if (ee->prop.min.w > 0)
223 minh = (ee->prop.min.h + fh); 223 minw = (ee->prop.min.w - fw);
224 maxw = (ee->prop.max.w + fw); 224 if (ee->prop.min.h > 0)
225 maxh = (ee->prop.max.h + fh); 225 minh = (ee->prop.min.h - fh);
226 if (ee->prop.max.w > 0)
227 maxw = (ee->prop.max.w + fw);
228 if (ee->prop.max.h > 0)
229 maxh = (ee->prop.max.h + fh);
226 } 230 }
227 else 231 else
228 { 232 {
229 minw = (ee->prop.min.w + fh); 233 if (ee->prop.min.w > 0)
230 minh = (ee->prop.min.h + fw); 234 minw = (ee->prop.min.w - fh);
231 maxw = (ee->prop.max.w + fh); 235 if (ee->prop.min.h > 0)
232 maxh = (ee->prop.max.h + fw); 236 minh = (ee->prop.min.h - fw);
237 if (ee->prop.max.w > 0)
238 maxw = (ee->prop.max.w + fh);
239 if (ee->prop.max.h > 0)
240 maxh = (ee->prop.max.h + fw);
233 } 241 }
234 242
235 /* adjust size using aspect */ 243 /* adjust size using aspect */
@@ -293,10 +301,15 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
293 nh = (minh + (((nh - minh) / ee->prop.step.h) * ee->prop.step.h)); 301 nh = (minh + (((nh - minh) / ee->prop.step.h) * ee->prop.step.h));
294 } 302 }
295 303
296 if (nw > maxw) nw = maxw; 304 if ((maxw > 0) && (nw > maxw))
297 else if (nw < minw) nw = minw; 305 nw = maxw;
298 if (nh > maxh) nh = maxh; 306 else if (nw < minw)
299 else if (nh < minh) nh = minh; 307 nw = minw;
308
309 if ((maxh > 0) && (nh > maxh))
310 nh = maxh;
311 else if (nh < minh)
312 nh = minh;
300 313
301 orig_w = nw; 314 orig_w = nw;
302 orig_h = nh; 315 orig_h = nh;