[PATCH v2] systray: Hide systray for fullscreen games

Hamish Claxton hamishclaxton at gmail.com
Thu Jan 3 22:14:57 CST 2019


Thanks guys for the advice and help.

I've spent the last few days rewriting the patch to solve the issues
brought up. Hopefully its all good now.
Would be good if I could get someone to test it for me and sign it off,
though I have tested the patch thoroughly
and it even works fine with games that have quirky resolution changes such
as Dragon Age Inqusition.
Not to mention it now supports borderless fullscreen modes.

Games tested:
 - Brothers - A Tale of Two Sons
 - Crysis 3
 - Dragon Age Inquisition
 - Just Cause 3
 - LEGO Pirates of the Caribbean
 - LEGO The Lord of the Rings
 - METAL GEAR SOLID V: THE PHANTOM PAIN
 - Project Eden

Thanks in Advance,
Hamish

On Sun, Dec 30, 2018 at 10:54 AM Hamish Claxton <hamishclaxton at gmail.com>
wrote:

> 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/20190104/e691b862/attachment.html>


More information about the wine-devel mailing list