summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-10-30 15:12:41 -0400
committerChris Michael <cp.michael@samsung.com>2015-10-30 15:12:41 -0400
commit60f5b43debcb2c7e71afe150da68d8889fe86fe5 (patch)
tree3a76d5b6feb89f47954298888b80f9d5e2bef969
parentb1bbe1f47c9ee23134a9b15aff08a932350048b6 (diff)
ecore-evas-wl: Ignore step size when maximizing
Summary; This fixes an issue where maximizing efl/elm apps in Weston and in Enlightenment would cause extra space to be left around the window. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c37
1 files changed, 20 insertions, 17 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 2da6c1b09e..634343b158 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
@@ -554,25 +554,28 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
554 w = h * ee->prop.aspect; 554 w = h * ee->prop.aspect;
555 } 555 }
556 556
557 /* calc new size using base size & step size */ 557 if (!ee->prop.maximized)
558 if (ee->prop.step.w > 0)
559 { 558 {
560 if (ee->prop.base.w >= 0) 559 /* calc new size using base size & step size */
561 w = (ee->prop.base.w + 560 if (ee->prop.step.w > 0)
562 (((w - ee->prop.base.w) / ee->prop.step.w) * 561 {
563 ee->prop.step.w)); 562 if (ee->prop.base.w >= 0)
564 else 563 w = (ee->prop.base.w +
565 w = (minw + (((w - minw) / ee->prop.step.w) * ee->prop.step.w)); 564 (((w - ee->prop.base.w) / ee->prop.step.w) *
566 } 565 ee->prop.step.w));
566 else
567 w = (minw + (((w - minw) / ee->prop.step.w) * ee->prop.step.w));
568 }
567 569
568 if (ee->prop.step.h > 0) 570 if (ee->prop.step.h > 0)
569 { 571 {
570 if (ee->prop.base.h >= 0) 572 if (ee->prop.base.h >= 0)
571 h = (ee->prop.base.h + 573 h = (ee->prop.base.h +
572 (((h - ee->prop.base.h) / ee->prop.step.h) * 574 (((h - ee->prop.base.h) / ee->prop.step.h) *
573 ee->prop.step.h)); 575 ee->prop.step.h));
574 else 576 else
575 h = (minh + (((h - minh) / ee->prop.step.h) * ee->prop.step.h)); 577 h = (minh + (((h - minh) / ee->prop.step.h) * ee->prop.step.h));
578 }
576 } 579 }
577 580
578 if ((maxw > 0) && (w > maxw)) 581 if ((maxw > 0) && (w > maxw))