From: Henri Verbeet Subject: Re: [PATCH 5/5] dxgi: Implement fullscreen window occlusion detection. Message-Id: Date: Tue, 23 Apr 2019 21:21:35 +0430 In-Reply-To: References: On Tue, 23 Apr 2019 at 17:29, Zhiyi Zhang wrote: > +/* A correct occlusion detection method must consider following scenarios: > + * > + * 1. 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. > + * 2. 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.