xserver: Branch 'master' - 2 commits

Peter Hutterer whot at kemper.freedesktop.org
Mon Aug 24 17:37:41 PDT 2009


 Xi/xichangecursor.c |    3 +++
 Xi/xiwarppointer.c  |   28 ++++++++++++++++++++++------
 configure.ac        |    2 +-
 3 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 0f9ffc887ca1471e98df746253d9300e03e46a15
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Aug 24 15:10:52 2009 +1000

    Xi: fix XIWarpPointer up for FP3232 as input coordinates.
    
    requires inputproto 1.9.99.902
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
index bb2521c..f659269 100644
--- a/Xi/xiwarppointer.c
+++ b/Xi/xiwarppointer.c
@@ -62,12 +62,12 @@ SProcXIWarpPointer(ClientPtr client)
     swaps(&stuff->length, n);
     swapl(&stuff->src_win, n);
     swapl(&stuff->dst_win, n);
-    swaps(&stuff->src_x, n);
-    swaps(&stuff->src_y, n);
+    swapl(&stuff->src_x, n);
+    swapl(&stuff->src_y, n);
     swaps(&stuff->src_width, n);
     swaps(&stuff->src_height, n);
-    swaps(&stuff->dst_x, n);
-    swaps(&stuff->dst_y, n);
+    swapl(&stuff->dst_x, n);
+    swapl(&stuff->dst_y, n);
     swaps(&stuff->deviceid, n);
     return (ProcXIWarpPointer(client));
 }
@@ -81,6 +81,8 @@ ProcXIWarpPointer(ClientPtr client)
     DeviceIntPtr pDev;
     SpritePtr pSprite;
     ScreenPtr newScreen;
+    int src_x, src_y;
+    int dst_x, dst_y;
 
     REQUEST(xXIWarpPointerReq);
     REQUEST_SIZE_MATCH(xXIWarpPointerReq);
@@ -105,6 +107,11 @@ ProcXIWarpPointer(ClientPtr client)
     x = pSprite->hotPhys.x;
     y = pSprite->hotPhys.y;
 
+    src_x = stuff->src_x / (double)(1 << 16);
+    src_y = stuff->src_y / (double)(1 << 16);
+    dst_x = stuff->dst_x / (double)(1 << 16);
+    dst_y = stuff->dst_y / (double)(1 << 16);
+
     if (stuff->src_win != None)
     {
         int winX, winY;
@@ -119,12 +126,12 @@ ProcXIWarpPointer(ClientPtr client)
         winX = src->drawable.x;
         winY = src->drawable.y;
         if (src->drawable.pScreen != pSprite->hotPhys.pScreen ||
-                x < winX + stuff->src_x ||
-                y < winY + stuff->src_y ||
+                x < winX + src_x ||
+                y < winY + src_y ||
                 (stuff->src_width != 0 &&
-                 winX + stuff->src_x + (int)stuff->src_width < 0) ||
+                 winX + src_x + (int)stuff->src_width < 0) ||
                 (stuff->src_height != 0 &&
-                 winY + stuff->src_y + (int)stuff->src_height < y) ||
+                 winY + src_y + (int)stuff->src_height < y) ||
                 !PointInWindowIsVisible(src, x, y))
             return Success;
     }
@@ -137,8 +144,8 @@ ProcXIWarpPointer(ClientPtr client)
     } else
         newScreen = pSprite->hotPhys.pScreen;
 
-    x += stuff->dst_x;
-    y += stuff->dst_y;
+    x += dst_x;
+    y += dst_y;
 
     if (x < 0)
         x = 0;
diff --git a/configure.ac b/configure.ac
index bbb5fa8..400c36c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
 dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.15] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
commit 5e96945cf54136afdb80cc17f67611251d59205d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Aug 21 12:15:54 2009 +1000

    Xi: fix swapping for XIWarpPointer and XIChangeCursor requests.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
index ea5bdeb..f071e84 100644
--- a/Xi/xichangecursor.c
+++ b/Xi/xichangecursor.c
@@ -60,6 +60,9 @@ SProcXIChangeCursor(ClientPtr client)
 
     REQUEST(xXIChangeCursorReq);
     swaps(&stuff->length, n);
+    swapl(&stuff->win, n);
+    swapl(&stuff->cursor, n);
+    swaps(&stuff->deviceid, n);
     REQUEST_SIZE_MATCH(xXIChangeCursorReq);
     return (ProcXIChangeCursor(client));
 }
diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
index bf361db..bb2521c 100644
--- a/Xi/xiwarppointer.c
+++ b/Xi/xiwarppointer.c
@@ -60,6 +60,15 @@ SProcXIWarpPointer(ClientPtr client)
 
     REQUEST(xXIWarpPointerReq);
     swaps(&stuff->length, n);
+    swapl(&stuff->src_win, n);
+    swapl(&stuff->dst_win, n);
+    swaps(&stuff->src_x, n);
+    swaps(&stuff->src_y, n);
+    swaps(&stuff->src_width, n);
+    swaps(&stuff->src_height, n);
+    swaps(&stuff->dst_x, n);
+    swaps(&stuff->dst_y, n);
+    swaps(&stuff->deviceid, n);
     return (ProcXIWarpPointer(client));
 }
 


More information about the xorg-commit mailing list