Re: mouse cursor problems

Nadav Frum <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <Pine.LNX.4.44_heb2.10.0402091407580.22295-100000@localhost.localdomain>
Regular Linux programs create a mouse cursor through the X libraries.  
The cursor's position and the updates to the screen are handled by the 
X Server.  This cursor is naturally confined to the screen.

The games played with WineX are usually in 3D, so the screen confines are 
no longer relevant.  The game's binary would then "grab" responsibility 
for drawing (or not drawing) the cursor and only the relative mouse 
movements are supplied to the game by the X server through WineX.  
However, the X server still believes that the cursor is confined to a 2D screen.

To avoid a problem arising when the cursor hits the sides of the screen, 
WineX tells the X server at regular intervals to "warp" the position of 
the cursor to roughly the middle of the screen (to coordinate <400,300>).

I believe the problem you are referring to happens when the game chooses 
to let the operating system handle the drawing of the cursor.  This 
usually happens during the menu stage of the game.  WineX would then relegate
the job to the X server.  The game asks for relative mouse information 
because it needs to know where you are on the menu.  WineX supplies the 
relative mouse information but also "warps" the cursor.  WineX is assuming 
wrongfully that the game is drawing the cursor.

If this is the problem, it can be fixed by incorporating a check as to who 
handles the drawing of the cursor before deciding to "warp" it.  "Warp" 
the cursor only when the game is responsible for drawing the cursor.  This 
should be quite easy to fix. 

I hope this helps.

Nadav
-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.