From d603306b70eed99b55064becd5c1656d6346cc88 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 17 Dec 2012 09:19:52 +0000 Subject: [PATCH] Add code to limit resize to the maximum resolution. Signed-off-by: Christopher Michael SVN revision: 81089 --- src/modules/conf_randr/e_smart_monitor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index c21eed525..8bb3cd5e1 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -839,6 +839,9 @@ _e_smart_monitor_resize_event(E_Smart_Data *sd, Evas_Object *mon, void *event) e_layout_coord_canvas_to_virtual(sd->layout.obj, (mw + dx), (mh + dy), &nw, &nh); + /* max sure we cannot resize beyond the max */ + if ((nw > sd->max.w) || (nh > sd->max.h)) return; + /* actually resize the monitor */ e_layout_child_resize(mon, nw, nh); }