On sobota 30. června 2018 10:00:18 CEST Mykola Krachkovsky wrote:
пʼятниця, 29 червня 2018 р. 16:33:24 EEST Fabian Vogt написано:
This is reported upstream as https://bugreports.qt.io/browse/QTBUG-67928
IMHO, that should be fixed in X drivers in the first place, not Qt. Am I wrong?
There is really nothing to fix, X server provides the DPI information in two ways: 1) One global DPI value. This is deprecated (for many years) and should not be used anymore. It can not be removed because of backward compatibility of the protocol. It is fixed to 96 DPI for legacy applications. 2) Resolution + physical size (=> DPI) is reported for every monitor using RandR. This provides accurate information even in mixed-DPI situation. Unlike the other value it can also change dynamically when the monitor setup changes. This should be used by today's applications. The issue is that some applications need a single DPI value for something and so they use 1) and then complain that it is incorrectly set to 96. There were many requests to use change it to some more realistic default, e.g. DPI of the primary monitor or average of all monitor DPIs... But X developers have strong opinion that since the value is deprecated, use of it should be discouraged so it will remain at 96 DPI. The applications should instead examine DPI of all connected monitors and calculate the single value in a way that makes sense for their use case - perhaps calculate average to look ok-ish on all monitors, or choose the maximum DPI and scale down when placed on other monitors, or resize to the real DPI of the current monitor when they are moved... There are many options and it is up to the application/framework to decide. The nvidia proprietary driver is rogue and overwrites the 1) value when loaded. I am not sure how it calculates the single value, I think it copies the one from primary monitor. Qt is now switching from using 1) and 2) to using only 2), which is great! Thank you Fabian for doing this work. Michal Srb -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org