My physical setup consists of two monitors: a Surface Pro set to the default DPI scaling of 200% and an external monitor without DPI scaling placed above the Surface. Depending on the activity I'm using two different configurations.
single monitor: only the external monitor
dual monitor: Surface as primary display, external monitor as secondary display
I'm using screeninfo to programmatically check which configuration is active and place a tkinter app in such a way that it always appears in the middle of the external monitor. Which is either the primary or secondary display.
The issue arises when using the dual monitor configuration. Here is a minimal example to test the behaviour:
It produces a window 600x200px in size with a 60px titlebar on the primary display. As this is the Surface with a DPI scaling of 200%, this ist exactly what I expect. When moving the window to the secondary display, it halves its size to 300x100px with a 30px titlebar. Again, as expected because all windows work like this.
When uncommenting the two lines related to screeninfo, the behaviour becomes wired. Now it produces a window 300x100px in size with a 60px titlebar on the primary display, which is half the expected size. When moving the window to the secondary display, it stays exactly the same and now has double the expected titlebar thickness. This is undesired because it produces an unreadably small window on the DPI scaled high DPI display and an unbearably large titlebar on the unscaled standard DPI display.
I have read #24, #26 as well as #29 and understand the motivation for adding this feature. However it seems that mixed DPI scalings cause issues as it appears that the unscaled pixelsize for the window and the primary display's DPI scaling for the titlebar is used, regardless of where the window is placed. I would really appreciate, if someone fixes this as in the current state screeninfo is unusable for me. I however tracked the addition of DPI awareness down to be0d70aeaa5ec9f2593831ede1c49ea094843398. So v0.5 works for me, as it gives me the number of displays and their respective resolution. I don't care about anything other than the default DPI scaling behaviour.
My physical setup consists of two monitors: a Surface Pro set to the default DPI scaling of 200% and an external monitor without DPI scaling placed above the Surface. Depending on the activity I'm using two different configurations.
I'm using screeninfo to programmatically check which configuration is active and place a tkinter app in such a way that it always appears in the middle of the external monitor. Which is either the primary or secondary display.
The issue arises when using the dual monitor configuration. Here is a minimal example to test the behaviour:
It produces a window 600x200px in size with a 60px titlebar on the primary display. As this is the Surface with a DPI scaling of 200%, this ist exactly what I expect. When moving the window to the secondary display, it halves its size to 300x100px with a 30px titlebar. Again, as expected because all windows work like this.
When uncommenting the two lines related to screeninfo, the behaviour becomes wired. Now it produces a window 300x100px in size with a 60px titlebar on the primary display, which is half the expected size. When moving the window to the secondary display, it stays exactly the same and now has double the expected titlebar thickness. This is undesired because it produces an unreadably small window on the DPI scaled high DPI display and an unbearably large titlebar on the unscaled standard DPI display.
I have read #24, #26 as well as #29 and understand the motivation for adding this feature. However it seems that mixed DPI scalings cause issues as it appears that the unscaled pixelsize for the window and the primary display's DPI scaling for the titlebar is used, regardless of where the window is placed. I would really appreciate, if someone fixes this as in the current state screeninfo is unusable for me. I however tracked the addition of DPI awareness down to be0d70aeaa5ec9f2593831ede1c49ea094843398. So v0.5 works for me, as it gives me the number of displays and their respective resolution. I don't care about anything other than the default DPI scaling behaviour.