discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=6732398856156161d9442b60bd56f8aaec9518c8

commit 6732398856156161d9442b60bd56f8aaec9518c8
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Sep 28 15:38:13 2015 -0400

    use client window coords for resize-moving without a frame_object
    
    improves placement of csd windows
    
    ref T2750
---
 src/bin/e_comp_object.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index e1d4b84..e5a508c 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -978,7 +978,7 @@ static void
 _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
 {
    E_Comp_Object *cw = data;
-   int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h;
+   int pw = 0, ph = 0, fw, fh, iw, ih, prev_w, prev_h, x, y;
 
    /* if frame_object does not exist, client_inset indicates CSD.
     * this means that ec->client matches cw->w/h, the opposite
@@ -1121,18 +1121,22 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, 
int w, int h)
     * which also changes the client's position
     */
    cw->force_move = 1;
+   if (cw->frame_object)
+     x = cw->x, y = cw->y;
+   else
+     x = cw->ec->x, y = cw->ec->y;
    switch (cw->ec->resize_mode)
      {
       case E_POINTER_RESIZE_BL:
       case E_POINTER_RESIZE_L:
-        evas_object_move(obj, cw->x + prev_w - cw->w, cw->y);
+        evas_object_move(obj, x + prev_w - cw->w, y);
         break;
       case E_POINTER_RESIZE_TL:
-        evas_object_move(obj, cw->x + prev_w - cw->w, cw->y + prev_h - cw->h);
+        evas_object_move(obj, x + prev_w - cw->w, y + prev_h - cw->h);
         break;
       case E_POINTER_RESIZE_T:
       case E_POINTER_RESIZE_TR:
-        evas_object_move(obj, cw->x, cw->y + prev_h - cw->h);
+        evas_object_move(obj, x, y + prev_h - cw->h);
         break;
       default:
         break;

-- 


Reply via email to