One more go at fixing GetCursorPos()

Stefan Dösinger stefandoesinger at gmx.at
Sat Dec 2 07:59:21 CST 2006


Am Mittwoch 29 November 2006 19:51 schrieb Vitaliy Margolen:

I gave your patch and test apps a try, and it seems to work fine here :-)

> test_msg.c - tests major problem that Alexandre pointed out about last
> fix attempt. Application in question does not process messages while
> calling GetCursorPos(). It still works properly with proposed patch.
Seems to work. It writes out relative mouse movement on the console and 
terminates after a while(well, the while loop).

It works too with the current wine git code, but as I understand it that is 
ok - You want to show that it still works after your change.

> di_mouse_2th.c - 2 threads showing that there are no extra thread local
> position involved (if there is such a thing). Cached cursor position is
> global to all threads. (Last numbers should stay at dt(0 0) at all
> times). Inside hook handler d(x y) should show relative mouse move
> delta.
Writes out a bunch of output like that:
Hook: code=0 w=200 [(136 125) 0 0 0] cur(142 129) d(-6 -4) Th: (142 129) dt(0 
0)
Hook: code=0 w=200 [(128 121) 0 0 0] cur(136 125) d(-8 -4) Th: (136 125) dt(0 
0)
Hook: code=0 w=200 [(114 119) 0 0 0] cur(128 121) d(-14 -2) Th: (128 121) dt(0 
0)
Hook: code=0 w=200 [(100 119) 0 0 0] cur(114 119) d(-14 0) Th: (114 119) dt(0 
0)
Hook: code=0 w=200 [(88 119) 0 0 0] cur(100 119) d(-12 0) Th: (100 119) dt(0 
0)
Hook: code=0 w=200 [(78 119) 0 0 0] cur(88 119) d(-10 0) Th: (88 119) dt(0 0)
Hook: code=0 w=200 [(77 120) 0 0 0] cur(78 119) d(-1 1) Th: (78 119) dt(0 0)
Hook: code=0 w=200 [(81 116) 0 0 0] cur(77 120) d(4 -4) Th: (77 120) dt(0 0)
Hook: code=0 w=200 [(85 110) 0 0 0] cur(81 116) d(4 -6) Th: (81 116) dt(0 0)
Hook: code=0 w=200 [(86 108) 0 0 0] cur(85 110) d(1 -2) Th: (85 110) dt(0 0)
Hook: code=0 w=200 [(86 106) 0 0 0] cur(86 108) d(0 -2) Th: (86 108) dt(0 0)
Hook: code=0 w=200 [(82 102) 0 0 0] cur(86 106) d(-4 -4) Th: (86 106) dt(0 0)
Hook: code=0 w=200 [(81 101) 0 0 0] cur(82 102) d(-1 -1) Th: (82 102) dt(0 0)
Hook: code=0 w=200 [(73 97) 0 0 0] cur(81 101) d(-8 -4) Th: (81 101) dt(0 0)
Hook: code=0 w=200 [(65 97) 0 0 0] cur(73 97) d(-8 0) Th: (73 97) dt(0 0)
Hook: code=0 w=200 [(57 97) 0 0 0] cur(65 97) d(-8 0) Th: (65 97) dt(0 0)
Hook: code=0 w=200 [(47 99) 0 0 0] cur(57 97) d(-10 2) Th: (57 97) dt(0 0)
Hook: code=0 w=200 [(43 103) 0 0 0] cur(47 99) d(-4 4) Th: (47 99) dt(0 0)
Hook: code=0 w=200 [(43 105) 0 0 0] cur(43 103) d(0 2) Th: (43 103) dt(0 0)

I will run both apps on windows(xp sp2) and compare the output.

> If anyone has any objections, comment, suggestions, please do send them.
Not really, my knowledge about the input code is too limited to give a 
qualified comment:-(

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20061202/c4504813/attachment.pgp


More information about the wine-devel mailing list