Hi Fabian,
In my testing, both SM_CXSCREEN and SM_CYSCREEN both return an int value that you can print out and check manually. I did this when initially figuring out what was going wrong. If you're unhappy, I could try comparing against the desktop windows dimensions instead. Or do you mean I should use the GetSystemMetrics() function? Either way, I thought the simplest method would be to just compare against those values.
I should mention though, that before applying this patch/fix, every game I tested had the issue, and afterwards did not have the issue. Here's a video I uploaded to demonstrate the issue: https://mega.nz/embed#!YU8GRKTS!nK2JGVs6EzAhu1bs-KtH1lajx6y3XRakTFNZUYNyTwo
Tested on both Wine and Wine Staging 4.0 rc4.
Thanks in Advance, Hamish
Hi Hamish,
SM_CXSCREEN and SM_CYSCREEN are constants, defined as 0 respective 1.
So basically your code is
if ( !( window.right >= 0 && window.bottom >= 1 ) ) do_show_systray();
And this is not correct. Those values are just flags to use in the GetSystemMetrics function. Did you check that the patch you sent in actually fixes the issue? Or did you only test with a previous version of your patch? Because I don't see how this would help.
Regards, Fabian Maurer
Hi Fabian,
The patch I sent in actually fixes the issue, I would not send in an untested patch.
I have just done some more digging, and you are right yes. If it wasn't working, then the systray would be showing, as 0x1 is less than whatever resolution you are using.
Just about to submit a v2 patch, which solves this and is actually smaller by just calling GetSystemMetrics with SM_CXSCREEN, SM_CYSCREEN, SM_CXFULLSCREEN & SM_CYFULLSCREEN.
Thanks in Advance, Hamish
On Sun, Dec 30, 2018 at 8:51 AM Fabian Maurer dark.shadow4@web.de wrote:
Hi Hamish,
SM_CXSCREEN and SM_CYSCREEN are constants, defined as 0 respective 1.
So basically your code is
if ( !( window.right >= 0 && window.bottom >= 1 ) )
do_show_systray();
And this is not correct. Those values are just flags to use in the GetSystemMetrics function.
Did you check that the patch you sent in actually fixes the issue? Or did you only test with a previous version of your patch? Because I don't see how this would help.
Regards,
Fabian Maurer