Physical "screen" size reported by the X11 backend is same as pixel count, fixing dpi to 25.4
Bug #1596051 reported by
Gerry Boland
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Medium
|
Unassigned | ||
Mir |
Fix Released
|
Medium
|
Andreas Pokorny | ||
mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hey, I'm testing mir on X11.
Qt is calculating the DPI value based on information Mir gives it about the screen. It uses either the DPI value Mir calculates, or the physical size of the screen to calculate DPI itself.
But the X11 backend reports the physical size equal to the number of pixels, so 1mm = 1 pixel. This makes the DPI calculation always return 25.4dpi, which causes Qt to render tiny fonts.
Could you please mock the physical screen size to return something so that DPI becomes something more sensible?
Related branches
lp://staging/~andreas-pokorny/mir/fix-1596051
- Cemil Azizoglu (community): Approve
- Alexandros Frantzis (community): Approve
- Mir CI Bot: Approve (continuous-integration)
-
Diff: 218 lines (+75/-5)6 files modifiedsrc/platforms/mesa/server/x11/graphics/display.cpp (+19/-1)
src/platforms/mesa/server/x11/graphics/display.h (+2/-0)
src/platforms/mesa/server/x11/graphics/display_configuration.cpp (+0/-1)
tests/include/mir/test/doubles/mock_x11.h (+2/-0)
tests/mir_test_doubles/mock_x11.cpp (+13/-0)
tests/unit-tests/graphics/mesa/x11/test_display.cpp (+39/-3)
summary: |
Physical "screen" size reported by the X11 backend is same as pixel - count, making the dpi calculation ~23 + count, fixing dpi to 25.4 |
Changed in mir: | |
assignee: | nobody → Andreas Pokorny (andreas-pokorny) |
status: | Confirmed → In Progress |
Changed in mir: | |
milestone: | none → 0.24.0 |
importance: | Undecided → Medium |
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
milestone: | none → 13 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Yeah, we should simply get the pixel density from the default screen..