Event trail - better patch
Brad Campbell
brad at seme.com.au
Wed Aug 29 07:52:56 CDT 2001
Ove Kaaven wrote:
>
> On Wed, 29 Aug 2001, Brad Campbell wrote:
>
> > Ok, I'm now at a dead loss.. Where does the message sent by X11DRV_SendEvent go?
>
> Through a lot of indirection, it is dispatched to mouse_event() in
> windows/input.c.
Thankyou.. I'm looking at it now..
This patch solves the problem without sending extra messages.. would this
be a resonably correct fix and shuold I post it to the developers list?
it appears that the mouse up/down events always rely on there having relative
movement info. The relative mouse movement info will always be nill on a
buttonpress when using a mouse as the mouse had to move to get it to the
button. Using a touchscreen, there is likley to be some radical absolute
position info.
--- input.c Wed Aug 29 20:48:23 2001
+++ input.c.new Wed Aug 29 20:49:33 2001
@@ -195,7 +195,7 @@
if (mi->dwFlags & (!SwappedButtons? MOUSEEVENTF_LEFTDOWN : MOUSEEVENTF_RIGHTDOWN))
{
MouseButtonsStates[0] = AsyncMouseButtonsStates[0] = TRUE;
- queue_raw_hardware_message( WM_LBUTTONDOWN, keystate, 0, PosX, PosY,
+ queue_raw_hardware_message( WM_LBUTTONDOWN, keystate, 0, mi->dx, mi->dy,
mi->time, mi->dwExtraInfo );
}
if (mi->dwFlags & (!SwappedButtons? MOUSEEVENTF_LEFTUP : MOUSEEVENTF_RIGHTUP))
@@ -207,7 +207,7 @@
if (mi->dwFlags & (!SwappedButtons? MOUSEEVENTF_RIGHTDOWN : MOUSEEVENTF_LEFTDOWN))
{
MouseButtonsStates[2] = AsyncMouseButtonsStates[2] = TRUE;
- queue_raw_hardware_message( WM_RBUTTONDOWN, keystate, 0, PosX, PosY,
+ queue_raw_hardware_message( WM_RBUTTONDOWN, keystate, 0, mi->dx, mi->dy,
mi->time, mi->dwExtraInfo );
}
if (mi->dwFlags & (!SwappedButtons? MOUSEEVENTF_RIGHTUP : MOUSEEVENTF_LEFTUP))
@@ -219,7 +219,7 @@
if (mi->dwFlags & MOUSEEVENTF_MIDDLEDOWN)
{
MouseButtonsStates[1] = AsyncMouseButtonsStates[1] = TRUE;
- queue_raw_hardware_message( WM_MBUTTONDOWN, keystate, 0, PosX, PosY,
+ queue_raw_hardware_message( WM_MBUTTONDOWN, keystate, 0, mi->dx, mi->dy,
mi->time, mi->dwExtraInfo );
}
if (mi->dwFlags & MOUSEEVENTF_MIDDLEUP)
--
Brad....
/"\
Save the Forests \ / ASCII RIBBON CAMPAIGN
Burn a Greenie. X AGAINST HTML MAIL
/ \
More information about the wine-users
mailing list