Mir

need API to discover hidpi scale factor

Bug #1398855 reported by Allison Karlitskaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Wishlist
Alexandros Frantzis

Bug Description

Although Mir has mir_surface_get_dpi(), this is not useful information for a toolkit or application authors in terms of which scaling factor they should use.

The user may want to configure the scaling factor independent of DPI and just because the DPI of a screen changes doesn't mean we should necessarily change the pixel size of controls.

We need an API that tells us the scaling factor directly.

kevin gunn (kgunn72)
Changed in mir:
importance: Undecided → High
assignee: nobody → Alexandros Frantzis (afrantzis)
tags: added: enhancement
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If your screen was physically 200DPI and you didn't like squinting and wanted more like 100DPI then that would certainly mean a scaling factor of 2.0 in theory. You could implement that as a literal scaling factor of 2.0, or you could implement it as a desktop DPI setting of "100DPI" (which is how Windows has done it for the past 20+ years).

So there are multiple ways to do this...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just remember that "scaling factor" like DPI will vary between monitors. And the approach so far has been to report the DPI/scale of a surface according to the monitor it is "mostly on" (not fully implemented yet).

What this means is that a "scaling factor" would be per-surface in case we need it to vary across different monitors.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Or rather, the source of the scaling factor would be the monitor structure itself. And reported to clients as an attribute of the surface according to placement.

Changed in mir:
status: New → Triaged
importance: High → Wishlist
Revision history for this message
Allison Karlitskaya (desrt) wrote :

I agree, except I would suggest that the scaling factor be whatever the highest scale is for any monitor that the window is partially on. You want to over-render and then downscale rather than the opposite just because I only happen to be 49% on the better quality screen.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes. Indeed it would be the highest scale factor of any monitor that the surface overlaps. Just as the reported DPI of a surface would be the highest for all monitors that are touched.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually this will become easier soon. I'm working on the glue between the display layout and independent surfaces right now for other WM work.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Fixed in Mir 0.17 (See surface_output_event)

Changed in mir:
status: Triaged → Fix Released
Changed in mir:
milestone: none → 0.17.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.