diff options
author | Chris Michael <cp.michael@samsung.com> | 2013-08-01 08:58:37 +0100 |
---|---|---|
committer | Deon Thomas <PrinceAMD.Elive@gmail.com> | 2013-08-01 11:49:57 -0400 |
commit | fa97eba302577e0482ed32724e0d3f32e7ec66b0 (patch) | |
tree | 1c781be809d5ac5ad75c4c08615a8899cdd9e016 /src/modules | |
parent | bfc9f1e7b15168adba7a3854d76bb8592f8ae3f4 (diff) | |
download | enlightenment-fa97eba302577e0482ed32724e0d3f32e7ec66b0.tar.gz |
Backport: e2cf7d3 :: Handle case of snapping for monitor being moved.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/conf_randr/e_smart_randr.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/conf_randr/e_smart_randr.c b/src/modules/conf_randr/e_smart_randr.c index 7acc4f3575..c0df86ebc1 100644 --- a/src/modules/conf_randr/e_smart_randr.c +++ b/src/modules/conf_randr/e_smart_randr.c @@ -747,6 +747,29 @@ _e_smart_randr_monitor_position_update(E_Smart_Data *sd, Evas_Object *obj, Evas_ e_smart_monitor_current_geometry_set(mon, m.x, (o.y + o.h), m.w, m.h); } + + /* handle move case for obj */ + else if ((o.x >= (m.x + (m.w / 3))) && + (((o.x <= ((m.x + m.w) + SNAP_FUZZ)) || + (o.x <= ((m.x + m.w) - SNAP_FUZZ))))) + { + /* don't move the monitor IF this movement would place it + * outside the virual grid */ + if (((m.x + m.w) + o.w) <= sd->vw) + e_smart_monitor_current_geometry_set(obj, (m.x + m.w), + o.y, o.w, o.h); + } + else if ((o.y >= (m.y + (m.h / 3))) && + (((o.y <= ((m.y + op.h) + SNAP_FUZZ)) || + (o.y <= ((m.y + op.h) - SNAP_FUZZ))))) + { + /* don't move the monitor IF this movement would place it + * outside the virual grid */ + if (((m.y + m.h) + o.h) <= sd->vh) + e_smart_monitor_current_geometry_set(obj, o.x, (m.y + m.h), + o.w, o.h); + } + } } |