Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h edge.c moveresize.c 


Log Message:
Correct window position when dragging window through area/desk switch.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.529
retrieving revision 1.530
diff -u -3 -r1.529 -r1.530
--- E.h 16 Jan 2006 12:45:55 -0000      1.529
+++ E.h 2 Feb 2006 18:38:03 -0000       1.530
@@ -561,7 +561,6 @@
       char               *machine_name;
    } wm;
    int                 mode;
-   char                flipp;
    char                action_inhibit;
    EWin               *focuswin;
    EWin               *mouse_over_ewin;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/edge.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- edge.c      7 Jan 2006 07:20:58 -0000       1.26
+++ edge.c      2 Feb 2006 18:38:03 -0000       1.27
@@ -96,9 +96,7 @@
    Mode.events.x += dx;
    Mode.events.y += dy;
    EWarpPointer(VRoot.win, Mode.events.x, Mode.events.y);
-   Mode.flipp = 1;
    DeskCurrentMoveAreaBy(dax, day);
-   Mode.flipp = 0;
    Mode.events.px = Mode.events.x;
    Mode.events.py = Mode.events.y;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- moveresize.c        7 Jan 2006 07:20:58 -0000       1.60
+++ moveresize.c        2 Feb 2006 18:38:03 -0000       1.61
@@ -64,7 +64,7 @@
 ActionMoveStart(EWin * ewin, int grab, char constrained, int nogroup)
 {
    EWin              **gwins;
-   int                 i, num, dx, dy;
+   int                 i, num;
 
    if (!ewin || ewin->state.inhibit_move)
       return 0;
@@ -82,14 +82,8 @@
    Mode.mode = MODE_MOVE_PENDING;
    Mode.constrained = constrained;
 
-   dx = EoGetX(EoGetDesk(ewin));
-   dy = EoGetY(EoGetDesk(ewin));
-   Mode_mr.start_x = Mode.events.x + dx;
-   Mode_mr.start_y = Mode.events.y + dy;
-   Mode_mr.win_x = EoGetX(ewin) + dx;
-   Mode_mr.win_y = EoGetY(ewin) + dy;
-   Mode_mr.win_w = ewin->client.w;
-   Mode_mr.win_h = ewin->client.h;
+   Mode_mr.win_x = Mode.events.x - (EoGetX(ewin) + EoGetX(EoGetDesk(ewin)));
+   Mode_mr.win_y = Mode.events.y - (EoGetY(ewin) + EoGetY(EoGetDesk(ewin)));
 
    RaiseEwin(ewin);
    gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, nogroup
@@ -222,7 +216,7 @@
 {
    EWin               *ewin, **lst;
    int                 i, num;
-   int                 x, y, fl;
+   int                 x, y, fl, dx, dy;
 
    ewin = Mode_mr.ewin;
    if (!ewin)
@@ -238,6 +232,9 @@
    if (Mode_mr.mode > 0)
       EGrabServer();
 
+   dx = Mode.events.x - Mode_mr.win_x - EoGetX(EoGetDesk(ewin)) - 
ewin->shape_x;
+   dy = Mode.events.y - Mode_mr.win_y - EoGetY(EoGetDesk(ewin)) - 
ewin->shape_y;
+
    /* Redraw any windows that were in "move mode" */
    lst =
       ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, Mode.nogroup, &num);
@@ -248,13 +245,8 @@
        if (!EoIsFloating(ewin))
           continue;
 
-       x = ewin->shape_x;
-       y = ewin->shape_y;
-       if (Mode.flipp)
-         {
-            x += Mode.events.x - Mode.events.px;
-            y += Mode.events.y - Mode.events.py;
-         }
+       x = ewin->shape_x + dx;
+       y = ewin->shape_y + dy;
        DrawEwinShape(ewin, Mode_mr.mode, x, y,
                      ewin->client.w, ewin->client.h, fl);
      }




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to