On 05/09/2013 12:36 PM, Alexandre Julliard wrote:
It's okay only because you are not actually calling it ;-)
Yeah, I don't call it until patch 2 in the series. This patch just introduces it without calling it, which does cause a warning. (I hope this doesn't violate the "atomic patches" rule.)
But no, you can't select for events on the gdi display; actually I don't think you want to do it this way at all.
So gdi_display should not receive events? I'm guessing this has something to do with the fact that Wine opens one Xlib Display per thread, so the XRandR resize events need to be pulled down on one of the thread-local X connections, rather than the master gdi_display. (I'm still not sure why Wine does it this way. Are certain versions of Xlib not thread-safe?)
Handling external resizes should be done in the desktop process, and most likely involves the wineserver too.
The event handler does call X11DRV_resize_desktop, which messages the desktop process with the new size. But, I can see how it would be cleaner to put the event checker in the same process as well, since that way the XRandR resize doesn't have to get processed once for every process on the system.
How would this involve the wineserver, though? It looks like we already have the infrastructure for synchronizing screen_width and screen_height changes from one process to another.
At any rate, it makes sense to keep winex11 and winemac in sync. If Ken's resize handling isn't proper, we should decide how to proceed now, so that both can be fixed in the same way.
It certainly won't be an easy task.
That's fine; this is the last issue that I need to resolve before Wine is pretty much "bug free" for me, so I'm more than happy to put in the extra effort. :)