Details
-
Task
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
None
Description
The Problem
Consider a desktop setup with a primary high-DPI display (A) and a secondary standard-DPI display (B).
In device pixel space the size and layout of the displays can look like this:
Display A is configured for 200% (2x) scaling, B runs at 100%. In device independent pixel space the layout looks like this:
There is now a gap between the displays, which may come as a surprise to applications.
Solutions
0) Do nothing. Having a display position gap is fine.
- Simple
- Predictable
-> This is how Qt currently handles display geometry when AA_EnableHighDpiScaling is enabled.
1) Move the displays (adjust logical display position)
We can apply heuristics that detects the inconsistency and make the displays be adjacent:
This would be implemented by moving all displays towards the origin; eliminating any gaps due to display resizing. Can we implement this robustly enough, or would it be a bug factory? (Think complex display layouts)
2) Make the end user lay out displays using the logical coordinate system.
This is in the domain of the operating system and out of scope for Qt, but is mentioned here for completeness.
With this solution the user sets up logical pixel layout directly (with the desired adjacencies) and there are no surprises. There is also the additional benefit that displays of similar physical size (in inches and centimeters) will have similar logical pixel sizes.
However, this creates the opposite problem where display geometry in physical pixel space now overlap. Some operating/windowing systems solve this by making logical pixels the only desktop-wide coordinate system. This works since physical/backing pixels do not have to have a defined desktop position.
Attachments
Issue Links
- relates to
-
QTBUG-56555 Need clarification of QScreen::geometry() for High DPI screens
- Reported