Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
draw.c ewins.c moveresize.c
Log Message:
Fix moving between offset desktops.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- draw.c 2 Mar 2005 23:23:55 -0000 1.58
+++ draw.c 4 Mar 2005 22:14:58 -0000 1.59
@@ -882,7 +882,7 @@
{
static GC gc = 0;
XGCValues gcv;
- int x1, y1, w1, h1, i, j, pw, ph;
+ int x1, y1, w1, h1, i, j, pw, ph, dx, dy;
static Pixmap b1 = 0, b2 = 0, b3 = 0;
static Font font = 0;
int bpp;
@@ -957,14 +957,22 @@
if (!b3)
b3 = XCreateBitmapFromData(disp, VRoot.win, gray3_bits, gray3_width,
gray3_height);
- x1 = ewin->shape_x;
- y1 = ewin->shape_y;
+
+ dx = DeskGetX(EoGetDesk(ewin));
+ dy = DeskGetY(EoGetDesk(ewin));
+ x1 = ewin->shape_x + dx;
+ y1 = ewin->shape_y + dy;
+
w1 = EoGetW(ewin) - (ewin->border->border.left +
ewin->border->border.right);
h1 = EoGetH(ewin) - (ewin->border->border.top +
ewin->border->border.bottom);
+
ewin->shape_x = x;
ewin->shape_y = y;
+ x += dx;
+ y += dy;
+
if ((w != ewin->client.w) || (h != ewin->client.h))
{
ewin->client.w = w;
@@ -1207,7 +1215,7 @@
}
else if (firstlast == 1)
{
- int dx, dy, wt, ht;
+ int wt, ht;
int adx, ady;
dx = x - x1;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ewins.c 27 Feb 2005 17:32:19 -0000 1.23
+++ ewins.c 4 Mar 2005 22:14:58 -0000 1.24
@@ -1375,6 +1375,13 @@
if (EoIsFloating(ewin))
{
+ /* Reparenting to root moves the desktop-relative coordinates */
+ dx = DeskGetX(EoGetDesk(ewin));
+ dy = DeskGetY(EoGetDesk(ewin));
+ ewin->shape_x += dx;
+ ewin->shape_y += dy;
+ ewin->req_x += dx;
+ ewin->req_y += dy;
EoSetFloating(ewin, 2);
}
else
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- moveresize.c 27 Feb 2005 01:11:51 -0000 1.31
+++ moveresize.c 4 Mar 2005 22:14:58 -0000 1.32
@@ -31,7 +31,7 @@
ActionMoveStart(EWin * ewin, int grab, char constrained, int nogroup)
{
EWin **gwins;
- int i, num;
+ int i, num, dx, dy;
if (!ewin || ewin->fixedpos)
return 0;
@@ -58,10 +58,13 @@
Mode.mode = MODE_MOVE_PENDING;
Mode.constrained = constrained;
- Mode.start_x = Mode.x;
- Mode.start_y = Mode.y;
- Mode.win_x = EoGetX(ewin);
- Mode.win_y = EoGetY(ewin);
+
+ dx = DeskGetX(EoGetDesk(ewin));
+ dy = DeskGetY(EoGetDesk(ewin));
+ Mode.start_x = Mode.x + dx;
+ Mode.start_y = Mode.y + dy;
+ Mode.win_x = EoGetX(ewin) + dx;
+ Mode.win_y = EoGetY(ewin) + dy;
Mode.win_w = ewin->client.w;
Mode.win_h = ewin->client.h;
@@ -70,9 +73,6 @@
for (i = 0; i < num; i++)
{
FloatEwinAt(gwins[i], EoGetX(gwins[i]), EoGetY(gwins[i]));
- /* This shouldn't be necessary ... will figure it out some other time */
- gwins[i]->shape_x = EoGetX(gwins[i]);
- gwins[i]->shape_y = EoGetY(gwins[i]);
}
Efree(gwins);
move_swapcoord_x = EoGetX(ewin);
@@ -514,7 +514,7 @@
ewin1 = gwins[i];
/* if its opaque move mode check to see if we have to float */
- /* the window aboe all desktops (reparent to root) */
+ /* the window above all desktops (reparent to root) */
if (Conf.movres.mode_move == 0)
DetermineEwinFloat(ewin1, ndx, ndy);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs