Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15, 6.7
-
None
Description
QScreen::geometry is not the same for Wayland and X11 with scaling. On Wayland, it uses "logical" geometry, which has sizes and positions based on each screen's device pixel ratio. On X11, the size is scaled, but the position is not. Because of this, QScreen (and pretty much any other part of Qt that uses global coordinates) doesn't make a great platform abstraction when dealing with UI scaling. In order to work around this, I had to do research, write more platform specific code and do trial and error testing. This is very time consuming when writing an app that uses lots of global coordinates, such as a screen capture app (in my case, KDE's Spectacle). If the coordinate systems for screen pixel geometry were more consistent, there would be fewer platform specific positioning bugs to watch out for.