[PATCH] Clean up XEvIE damage in dix/events.c
Daniel Stone
daniel at fooishbar.org
Thu Aug 17 10:42:59 PDT 2006
On Thu, Aug 17, 2006 at 08:40:58PM +0300, Daniel Stone wrote:
> This patch fixes a bunch of XEvIE detritus in dix/events.c by changing:
> [...]
> XEvIE people, ACK/NAK?
And the patch this time. Also available at
http://people.freedesktop.org/~daniels/fix-xevie-damage.diff
Cheers,
Daniel
-------------- next part --------------
diff --git a/dix/events.c b/dix/events.c
index de83d5c..6d5dfce 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -462,13 +462,7 @@ XineramaCheckVirtualMotion(
if (qe)
{
sprite.hot.pScreen = qe->pScreen; /* should always be Screen 0 */
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = qe->event->u.keyButtonPointer.rootX;
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = qe->event->u.keyButtonPointer.rootY;
pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo :
NullWindow;
@@ -505,24 +499,12 @@ #endif
lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
if (sprite.hot.x < lims.x1)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = lims.x1;
else if (sprite.hot.x >= lims.x2)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = lims.x2 - 1;
if (sprite.hot.y < lims.y1)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = lims.y1;
else if (sprite.hot.y >= lims.y2)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = lims.y2 - 1;
if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
@@ -535,6 +517,10 @@ #endif
qe->event->u.keyButtonPointer.rootY = sprite.hot.y;
}
}
+#ifdef XEVIE
+ xeviehot.x = sprite.hot.x;
+ xeviehot.y = sprite.hot.y;
+#endif
}
@@ -552,33 +538,15 @@ XineramaCheckMotion(xEvent *xE)
panoramiXdataPtr[0].x;
XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
panoramiXdataPtr[0].y;
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = XE_KBPTR.rootX;
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = XE_KBPTR.rootY;
if (sprite.hot.x < sprite.physLimits.x1)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = sprite.physLimits.x1;
else if (sprite.hot.x >= sprite.physLimits.x2)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = sprite.physLimits.x2 - 1;
if (sprite.hot.y < sprite.physLimits.y1)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = sprite.physLimits.y1;
else if (sprite.hot.y >= sprite.physLimits.y2)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = sprite.physLimits.y2 - 1;
if (sprite.hotShape)
@@ -596,6 +564,8 @@ #endif
}
#ifdef XEVIE
+ xeviehot.x = sprite.hot.x;
+ xeviehot.y = sprite.hot.y;
xeviewin =
#endif
sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y);
@@ -821,13 +791,7 @@ #endif
if (qe)
{
sprite.hot.pScreen = qe->pScreen;
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = qe->event->u.keyButtonPointer.rootX;
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = qe->event->u.keyButtonPointer.rootY;
pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo :
NullWindow;
@@ -839,31 +803,16 @@ #endif
if (sprite.hot.pScreen != pWin->drawable.pScreen)
{
sprite.hot.pScreen = pWin->drawable.pScreen;
-#ifdef XEVIE
- xeviehot.x = xeviehot.y = 0;
-#endif
sprite.hot.x = sprite.hot.y = 0;
}
lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
if (sprite.hot.x < lims.x1)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = lims.x1;
else if (sprite.hot.x >= lims.x2)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = lims.x2 - 1;
if (sprite.hot.y < lims.y1)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = lims.y1;
else if (sprite.hot.y >= lims.y2)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = lims.y2 - 1;
#ifdef SHAPE
if (wBoundingShape(pWin))
@@ -876,6 +825,10 @@ #endif
qe->event->u.keyButtonPointer.rootY = sprite.hot.y;
}
}
+#ifdef XEVIE
+ xeviehot.x = sprite.hot.x;
+ xeviehot.y = sprite.hot.y;
+#endif
ROOT = WindowTable[sprite.hot.pScreen->myNum];
}
@@ -2057,34 +2010,20 @@ #endif
sprite.hot.pScreen = sprite.hotPhys.pScreen;
ROOT = WindowTable[sprite.hot.pScreen->myNum];
}
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = XE_KBPTR.rootX;
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = XE_KBPTR.rootY;
if (sprite.hot.x < sprite.physLimits.x1)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = sprite.physLimits.x1;
else if (sprite.hot.x >= sprite.physLimits.x2)
-#ifdef XEVIE
- xeviehot.x =
-#endif
sprite.hot.x = sprite.physLimits.x2 - 1;
if (sprite.hot.y < sprite.physLimits.y1)
-#ifdef XEVIE
- xeviehot.y =
-#endif
sprite.hot.y = sprite.physLimits.y1;
else if (sprite.hot.y >= sprite.physLimits.y2)
+ sprite.hot.y = sprite.physLimits.y2 - 1;
#ifdef XEVIE
- xeviehot.y =
+ xeviehot.x = sprite.hot.x;
+ xeviehot.y = sprite.hot.y;
#endif
- sprite.hot.y = sprite.physLimits.y2 - 1;
#ifdef SHAPE
if (sprite.hotShape)
ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060817/4a045b6f/attachment.pgp>
More information about the xorg
mailing list