princeamd pushed a commit to branch enlightenment-0.17.

commit fa97eba302577e0482ed32724e0d3f32e7ec66b0
Author: Chris Michael <[email protected]>
Date:   Thu Aug 1 08:58:37 2013 +0100

    Backport: e2cf7d3 :: Handle case of snapping for monitor being moved.
    
    Signed-off-by: Chris Michael <[email protected]>
    Signed-off-by: Deon Thomas <[email protected]>
---
 src/modules/conf_randr/e_smart_randr.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/modules/conf_randr/e_smart_randr.c 
b/src/modules/conf_randr/e_smart_randr.c
index 7acc4f3..c0df86e 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);
+          }
+
      }
 }
 

-- 

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

Reply via email to