DGA input events dropped

Ove Kaaven ovehk at ping.uio.no
Sat Sep 6 01:44:55 CDT 2003

fre, 05.09.2003 kl. 22.02 skrev Thomas J. Moore:
> For a very long time now, enabling DGA causes mouse/keyboard events to be
> ignored.  There have been a few threads on this issue in the past, and it
> seems nobody is willing to actually fix this problem (even though some have
> submitted patches to fix it, nothing has ever made it into CVS).  Why is 
> this?

Probably because all those patches are based on having gdi_display
receive events. It should not. Consequently, DGA should be initialized
using a per-thread display so that events arrive on a per-thread
display. Originally I had thought that the DGA driver could create a
separate thread and use its thread display, but it may not be strictly
necessary, given that DirectDraw needs a cooperative window, and windows
are per-thread objects, so the thread that owns the cooperative window
could also own the DGA display. If we also assume that this thread calls
SetMode, it's probably okay to just use the current thread_display()
instead of gdi_display. But I suppose it's probably still safer to let
DGA create its own thread, though somewhat more involved (you may have
to use XSendEvent or some kind of wineserver stuff to forward keyboard
and mouse events to the thread that owns the cooperative window).
Besides, a separate thread would allow the DGA code to handle its own
events, instead of scattering DGA special cases around the rest of the
x11drv event-handling code.

More information about the wine-devel mailing list