Window state storage should be using gu values rather than px

Bug #1674263 reported by Nick Dedekind
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Triaged
Medium
Michał Sawicz
unity8 (Ubuntu)
Triaged
Medium
Lukáš Tinkl

Bug Description

Store the size (and position?) in GU values rather than px.

Changed in unity8 (Ubuntu):
assignee: nobody → Lukáš Tinkl (lukas-kde)
status: New → Triaged
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
status: New → Triaged
importance: Undecided → Medium
Changed in unity8 (Ubuntu):
importance: Undecided → Medium
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
milestone: none → u8c-2
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not sure about this one. Legacy apps (actually all apps) that size themselves by pixels might get their sizes rounded to something inappropriate if you used 'int gu'. Or do you mean 'float gu'? The latter would avoid the problem (despite lack of precision), but even better would be to not fix this bug at all.

Revision history for this message
Michał Sawicz (saviq) wrote :

Yes, float gu. The reason for that is restoring windows on a display with different density. If we recall a window from GU=8 on a GU=16 screen, it will not be what you wanted.

In this scenario apps get told what size (and scale) they are, not the other way around.

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.