Fix for absolute mouse input
Brad Campbell
brad at seme.com.au
Wed Sep 19 23:44:34 CDT 2001
This solves a problem when using a touchscreen for mouse input.
The x11drv only updates it's mouse position data on a mousemove event
these do not occur when using a touchscreen, but the mouse buttonpress
events always grab an absolute position using get_coords(), so by adding
an _ABSOULTE to the mouse event in event.c and on seeing that flag in
input.c, setting the mouse position immediately, we solve the problem.
CHANGELOG
* windows/x11drv/event.c
windows/input.c
Fixes mouse position data on a buttonpress event to
solve a problem where touchscreens don't give mousemove
events. <brad at seme.com.au>
Index: windows/input.c
===================================================================
RCS file: /home/wine/wine/windows/input.c,v
retrieving revision 1.60
diff -u -r1.60 input.c
--- windows/input.c 2001/09/12 17:19:13 1.60
+++ windows/input.c 2001/09/18 07:47:07
@@ -187,6 +187,12 @@
}
}
+ if (!(mi->dwFlags & MOUSEEVENTF_MOVE) && (mi->dwFlags & MOUSEEVENTF_ABSOLUTE))
+ {
+ PosX = mi->dx;
+ PosY = mi->dy;
+ }
+
if (mi->dwFlags & MOUSEEVENTF_MOVE)
{
queue_raw_hardware_message( WM_MOUSEMOVE, keystate, 0, PosX, PosY,
Index: windows/x11drv/event.c
===================================================================
RCS file: /home/wine/wine/windows/x11drv/event.c,v
retrieving revision 1.107
diff -u -r1.107 event.c
--- windows/x11drv/event.c 2001/08/24 00:27:00 1.107
+++ windows/x11drv/event.c 2001/09/18 07:47:21
@@ -477,7 +477,7 @@
break;
}
- X11DRV_SendEvent( statusCodes[buttonNum], pt.x, pt.y,
+ X11DRV_SendEvent( statusCodes[buttonNum] | MOUSEEVENTF_ABSOLUTE, pt.x, pt.y,
keystate, wData, event->time - X11DRV_server_startticks, hWnd);
}
--
Brad....
/"\
Save the Forests \ / ASCII RIBBON CAMPAIGN
Burn a Greenie. X AGAINST HTML MAIL
/ \
More information about the wine-patches
mailing list