[PATCH v2] systray: Hide systray for fullscreen games

Hamish Claxton hamishclaxton at gmail.com
Sat Dec 29 18:54:38 CST 2018


Hi Fabian,

Yes, this only hides the tray when it should. The code only happens on the
WM_DISPLAYCHANGE event, which occurs on resolution changes. I wouldn't
write any code that would damage any existing features.

While the resolutions shouldn't differ, actually the SM_CYFULLSCREEN
reports a larger dimension by 11. What happens is beforehand, the systray
was getting drawn no matter what on a resolution update. This patch checks
if the current foreground game is covering the entire screen, hence
covering the area where the systray would normally be drawn, which is also
the entire desktop resolution, and if it is, does not draw the systray.

I tested this patch thoroughly and it only enhances existing functionality.

Thanks in Advance,
Hamish

On Sun, Dec 30, 2018 at 10:44 AM Fabian Maurer <dark.shadow4 at web.de> wrote:

> Hi Hamish,
>
>
>
> > if ( !( GetSystemMetrics(SM_CXFULLSCREEN) >=
> GetSystemMetrics(SM_CXSCREEN)
>
> > && GetSystemMetrics(SM_CYFULLSCREEN) >= GetSystemMetrics(SM_CYSCREEN) ))
>
>
>
> Why are you comparing two system metrics? Are they changing when a program
> goes fullscreen? I'm pretty sure they don't.
>
> Did you also test that it only hides the taskbar when it should? For me
> both SM_CXSCREEN and SM_CXFULLSCREEN are 1920 - that would hide the tray
> always, even in windowed mode.
>
>
>
> Regards,
>
> Fabian Maurer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181230/d5d0899f/attachment.html>


More information about the wine-devel mailing list