On Tue, 23 Apr 2019 at 17:29, Zhiyi Zhang zzhang@codeweavers.com wrote:
+/* A correct occlusion detection method must consider following scenarios:
- On multiple monitors system. For example, the full-screen is on primary display, any window on
- on secondary monitor shouldn't be able to occlude the full-screen window, regardless being foreground or active.
- A non-Wine window, e.g., a X window occludes the full-screen window should be detected.
- Current method will incorrectly report occluded status where a window on a secondary monitor becomes foreground,
- which shouldn't be too harmful though. The actual implementation on Window probably has help from DWM.
- X11 VisibilityNotify is not useful here. The events doesn't work as expected.
- */
What is the actual issue with VisibilityNotify?
In any case, I imagine we should implement this on top of D3DKMTCheckOcclusion(). That would then still need to be implemented in gdi32, of course. It may also make more sense to check for swapchain occlusion in wined3d, since e.g. d3d9ex is also supposed to check for that.