wine-ShowCursor-D3D-over-GDI.patch

Andrew Riedi andrewriedi at gmail.com
Sat Jul 29 14:04:35 CDT 2006


Thank you for the response.  I will try to use the same style as the rest of
the file.  The application (WoW) only calls D3D's SetCursor().  It calls
this to make the cursor not visible anymore, since it draws its own.
Currently, D3D's SetCursor() will not remove the system mouse cursor, which
causes it to be drawn over the one that WoW draws.  There needs to be code
to remove the system cursor to begin with, every time a d3d application
starts, otherwise the approach of "drawing it ourselves" will not work.  The
window manager already draws it.  Unless we "undraw" the cursor that the wm
makes, it will stay there.  Again, you guys know more than me about this,
but it seems a quick call to User32's SetCursor() is the cleanest way to fix
said problem, as msdn allows it.

On 7/29/06, H. Verbeet <hverbeet at gmail.com> wrote:
>
> On 29/07/06, Andrew Riedi <andrewriedi at gmail.com> wrote:
> > Well, here is my first patch, feel free to tell me what all is wrong
> with
> > it.  I noticed a problem in WoW d3d, so I tracked it down and checked
> out
> > msdn.  It seems that implementing ShowCursor() over GDI is acceptable,
> at
> > least according to msdn, and it seems to work great.  Anyhow, this patch
> > fixes the two mouse cursor problem in WoW, and makes wined3d more
> compatible
> > with windows, at least msdn.  Here goes nothing.
> >
> > --
> > Andrew Riedi
> That's not quite what MSDN says. It says that the Direct3D cursor can
> be implemented either by using user32 cursors to draw the cursor, or
> by doing the drawing itself. We currently do the latter, so I don't
> think we should touch the user32 cursor in
> IWineD3DDeviceImpl_ShowCursor(). Also see MSDN on
> IDirect3DDevice9::SetCursorProperties().
>
> You'll probably want to check if the application calls SetCursor(NULL)
> anywhere, I don't think that works properly at the moment in wine, if
> no cursor has been explicitly set before. (It checks if the cursor has
> changed in SetCursor(), but initially thread_info->cursor seems to be
> NULL, rather than the default cursor.) Note that you'll have to add
> your own TRACEs to do that though, as the TRACE in SetCursor() won't
> catch it.
>
> Also, please try to use the same style for patches as the rest of the
> file. ie, spaces rather than tabs, braces, etc.
>



-- 
Andrew Riedi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20060729/678fccca/attachment.html


More information about the wine-patches mailing list