-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Minor Bug] - having a DPI above 100% causes false negatives for window visibility check #312
Comments
We've encountered this issue before after introducing the window visibility check and I believe did not find a quick or easy solution back then, which is why we introduced a config-file only flag to disable the visibility check. I'll definitely look into declaring SRS as DPI aware, since I'm not sure we've tried that before, but it might not be a full solution either since it apparently requires Windows 10, while we still have some Windows 7 users as well. Will still check it out and see though, thanks for the link 👍 |
Yes, seems that windows messes up with the pixel positions when you change the scale and layout on your screen. Having set the size of text on win10 to 175%, x=position of the srs window is now around 1600 in the global.cfg when I put my window to the right side of the screen while it was around 3000 before scaling up the font. (Single screen setup with 3840x2160 display resolution) In case you have the old values of 3000 in your global.cfg and you change your scale, srs window is no longer visible. Not having looked deeply into that, I think we have to do some magic with https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control.logicaltodeviceunits?view=netframework-4.8 (available from .net 4.7) in order to fix that. |
Is anyone looking for something which will fix this? I can try to take a crack at it if you're open to public pull requests. |
@Pfheonix if you can solve it it would be much appreciated! |
I run my main monitor at 3840 x 2160 and a 1920 x 1080 monitor on each side. The main monitor has its DPI set to 150%. If move the SRS client to either secondary monitor and close it, it shows "The SRS client window is no longer visible..." message on next startup. Here's an example log:
Also after it has reset the app position, the favorites are not listed and can not be added or removed until app reload.
If I set the monitor to 100% DPI it works fine (have to log out and in for changes to effect).
I'm not super familiar with dotnet so I only dug a bit but there was mention of declaring the app DPI aware to get the proper dimensions from
System.Windows.Forms.Screen
. I have no idea how deep that rabbit hole goes though so just thought I'd mention it.The text was updated successfully, but these errors were encountered: