Merge lp:~vanvugt/mir/fix-1308941 into lp:mir
Proposed by
Daniel van Vugt
Status: | Merged |
---|---|
Approved by: | Alberto Aguirre |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1573 |
Proposed branch: | lp:~vanvugt/mir/fix-1308941 |
Merge into: | lp:mir |
Diff against target: |
181 lines (+127/-4) 2 files modified
src/platform/graphics/mesa/real_kms_display_configuration.cpp (+19/-3) tests/unit-tests/graphics/mesa/test_display_configuration.cpp (+108/-1) |
To merge this branch: | bzr merge lp:~vanvugt/mir/fix-1308941 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Robert Carr (community) | Approve | ||
Alberto Aguirre (community) | Approve | ||
Alexandros Frantzis (community) | Approve | ||
Review via email: mp+217021@code.launchpad.net |
Commit message
Ensure Mir remembers the current display mode even when the display is off.
So it's easy to toggle a monitor's power mode and it will stay in the
same mode. (LP: #1308941)
The one exception where current_mode_index is not restored is when the
definition of that display mode index has changed (e.g. new monitor plugged
in). When that happens, fall back to the preferred mode.
To post a comment you must log in.
32 + output. current_ mode_index = preferred_ mode_index;
We are essentially misinforming the users about the current state of their displays. That being said, we are only doing so when a display is not used or is not in the mir_power_mode_on state (the only cases were there is no current mode set), so I don't think this will cause problems. It will a bit strange when we print out display information, though (e.g. with mirout).
I can't think of a another way to provide easy power on/off, or a particular failure scenario for this approach, so OK, but we should keep an eye out for unintended consequences.