Re: mouse problem with 'standard' Windows program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Nov 2001 12:03:53 +0800, "Dmitry Timoshkov"
<dmitry@sloboda.ru> wrote:

>"gerard patel" <g.patel@wanadoo.fr.invalid> wrote:
>
>> I'll send the patch to winehq but I'm not sure how it will
>> be received...
>
>Is the MsgWaitForMultipleObjects() call really needed?


That's an interesting question :-)

If you have not downloaded the app yourself, here is the
problem as I have understood it : the app basically emulates
a scroll bar. To handle repetitions, it uses GetAsyncKeyState
to test the left mouse button in a rather primitive software loop
combined with GetTickCount() calls. However, when the user
release the mouse button, an X event is generated, but it is
never seen because Wine does not process X events
asynchronously.

I think that it worked before because of a part of code that
I have never understood : the code used to do :

 /* all states to false */
memset( AsyncMouseButtonsStates, 0, sizeof(AsyncMouseButtonsStates) );
memset( AsyncKeyStateTable, 0, sizeof(AsyncKeyStateTable) );

Now, that seems to me more efficient but more wrong that
calling MsgWaitForMultipleObjects. At last my solution
updates the key state correctly.

The right solution would probably to process some or all
X events completely asynchronously but I'm unsure if it
is the way to go. I have not yet sent the patch to Winehq
because I would like to think more about it. Thanks for
your input :-)

Gerard


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux