summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-08-24 15:10:52 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-08-25 10:24:08 +1000
commit0f9ffc887ca1471e98df746253d9300e03e46a15 (patch)
tree460bc8deca18dbe90307673d1499c8d6d38cce1b
parent5e96945cf54136afdb80cc17f67611251d59205d (diff)
Xi: fix XIWarpPointer up for FP3232 as input coordinates.
requires inputproto 1.9.99.902 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--Xi/xiwarppointer.c27
-rw-r--r--configure.ac2
2 files changed, 18 insertions, 11 deletions
diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
index bb2521c43..f659269bb 100644
--- a/Xi/xiwarppointer.c
+++ b/Xi/xiwarppointer.c
@@ -62,12 +62,12 @@ SProcXIWarpPointer(ClientPtr client)
62 swaps(&stuff->length, n); 62 swaps(&stuff->length, n);
63 swapl(&stuff->src_win, n); 63 swapl(&stuff->src_win, n);
64 swapl(&stuff->dst_win, n); 64 swapl(&stuff->dst_win, n);
65 swaps(&stuff->src_x, n); 65 swapl(&stuff->src_x, n);
66 swaps(&stuff->src_y, n); 66 swapl(&stuff->src_y, n);
67 swaps(&stuff->src_width, n); 67 swaps(&stuff->src_width, n);
68 swaps(&stuff->src_height, n); 68 swaps(&stuff->src_height, n);
69 swaps(&stuff->dst_x, n); 69 swapl(&stuff->dst_x, n);
70 swaps(&stuff->dst_y, n); 70 swapl(&stuff->dst_y, n);
71 swaps(&stuff->deviceid, n); 71 swaps(&stuff->deviceid, n);
72 return (ProcXIWarpPointer(client)); 72 return (ProcXIWarpPointer(client));
73} 73}
@@ -81,6 +81,8 @@ ProcXIWarpPointer(ClientPtr client)
81 DeviceIntPtr pDev; 81 DeviceIntPtr pDev;
82 SpritePtr pSprite; 82 SpritePtr pSprite;
83 ScreenPtr newScreen; 83 ScreenPtr newScreen;
84 int src_x, src_y;
85 int dst_x, dst_y;
84 86
85 REQUEST(xXIWarpPointerReq); 87 REQUEST(xXIWarpPointerReq);
86 REQUEST_SIZE_MATCH(xXIWarpPointerReq); 88 REQUEST_SIZE_MATCH(xXIWarpPointerReq);
@@ -105,6 +107,11 @@ ProcXIWarpPointer(ClientPtr client)
105 x = pSprite->hotPhys.x; 107 x = pSprite->hotPhys.x;
106 y = pSprite->hotPhys.y; 108 y = pSprite->hotPhys.y;
107 109
110 src_x = stuff->src_x / (double)(1 << 16);
111 src_y = stuff->src_y / (double)(1 << 16);
112 dst_x = stuff->dst_x / (double)(1 << 16);
113 dst_y = stuff->dst_y / (double)(1 << 16);
114
108 if (stuff->src_win != None) 115 if (stuff->src_win != None)
109 { 116 {
110 int winX, winY; 117 int winX, winY;
@@ -119,12 +126,12 @@ ProcXIWarpPointer(ClientPtr client)
119 winX = src->drawable.x; 126 winX = src->drawable.x;
120 winY = src->drawable.y; 127 winY = src->drawable.y;
121 if (src->drawable.pScreen != pSprite->hotPhys.pScreen || 128 if (src->drawable.pScreen != pSprite->hotPhys.pScreen ||
122 x < winX + stuff->src_x || 129 x < winX + src_x ||
123 y < winY + stuff->src_y || 130 y < winY + src_y ||
124 (stuff->src_width != 0 && 131 (stuff->src_width != 0 &&
125 winX + stuff->src_x + (int)stuff->src_width < 0) || 132 winX + src_x + (int)stuff->src_width < 0) ||
126 (stuff->src_height != 0 && 133 (stuff->src_height != 0 &&
127 winY + stuff->src_y + (int)stuff->src_height < y) || 134 winY + src_y + (int)stuff->src_height < y) ||
128 !PointInWindowIsVisible(src, x, y)) 135 !PointInWindowIsVisible(src, x, y))
129 return Success; 136 return Success;
130 } 137 }
@@ -137,8 +144,8 @@ ProcXIWarpPointer(ClientPtr client)
137 } else 144 } else
138 newScreen = pSprite->hotPhys.pScreen; 145 newScreen = pSprite->hotPhys.pScreen;
139 146
140 x += stuff->dst_x; 147 x += dst_x;
141 y += stuff->dst_y; 148 y += dst_y;
142 149
143 if (x < 0) 150 if (x < 0)
144 x = 0; 151 x = 0;
diff --git a/configure.ac b/configure.ac
index bbb5fa8bd..400c36c56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
708XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' 708XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
709 709
710dnl Core modules for most extensions, et al. 710dnl Core modules for most extensions, et al.
711REQUIRED_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]" 711REQUIRED_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]"
712REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]" 712REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
713 713
714dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas 714dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas