Mouse warp questions

Stefan Dösinger stefandoesinger at gmx.at
Sat Apr 16 17:52:10 CDT 2005


> Are you sure that by disabling MOUSE_HACK, it fixes your problem ? If yes,
> it's more a side effect of what exactly MOUSE_HACK is than a real fix.
Yes, it "fixes" the problem. The mouse wasn't moved once during my 2 minute 
test, but it looks like this is because the mouse warp is broken with 
MOUSE_HACK undefined.

> If you could do a +cursor,+dinput trace we could see if it's the classical
> problem or not.
Log is attached.

I digged a little bit into the mouse warp thing. It looks like that the mouse 
warp is used for applications which read the mouse moves. But the cursor 
still exists and if it reaches the boarder of the screen X wouldn't report 
any changes in the mouse position, so wine constantly warps the mouse back to 
the middle of the screen.

MSDN states that there's no cursor handled by windows in ddraw fullscreen mode 
and that apps have to rely on mouse moves and draw the cursor themselves if 
they need one. Settler 3 seems to read the mouse moves and set the cusor, 
which is correct. But wine sets the cursor back to the center of the screen 
and thus eliminates the mouse move.

Are my observations correct? In this case any game which uses 
DDSCL_FULLSCREEN, DirectInput and the mouse cursor this this way will fail.

Settlers 3 has a strange problem with the fullscreen mode. It sets WS_CAPTION 
in it's main window's style and the DDSCL_EXCLUSIVE and DDSCL_NORMAL flags 
when calling DirectDraw_SetCooperativeLevel. In Managed mode my window 
manager draws the window caption and the contents of the window are 
missplaced. In Desktop mode wine reserves space for a window caption and 
missplaces the contents of the window and I get a black window caption inside 
the Desktop window.
I worked around this problem by filtering the WS_CAPTION flag in 
Main_DirectDraw_SetCooperativeLevel, which is not correct but works for that 
game. This doesn't influence the mouse warp problem, but I thought it might 
be worth mentioning.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: di.log.gz
Type: application/x-gzip
Size: 3720 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050416/3a281c06/di.log.bin


More information about the wine-devel mailing list