Merge lp:~albaguirre/unity-mir/hide-surface-during-app-suspend into lp:unity-mir

Proposed by Alberto Aguirre
Status: Merged
Approved by: Alberto Aguirre
Approved revision: 176
Merged at revision: 183
Proposed branch: lp:~albaguirre/unity-mir/hide-surface-during-app-suspend
Merge into: lp:unity-mir
Diff against target: 21 lines (+4/-0)
1 file modified
src/modules/Unity/Application/application.cpp (+4/-0)
To merge this branch: bzr merge lp:~albaguirre/unity-mir/hide-surface-during-app-suspend
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Gerry Boland (community) Approve
Andreas Pokorny (community) Approve
Review via email: mp+205695@code.launchpad.net

Commit message

Set the visibility state on the mir surface attached to the application during suspend/resume states.

By setting the visibility state (hide) of the mir surface during an appilcation suspend state, mir can avoid compositing the surface even regardless of opaqueness and alpha pixel format.

fixes: lp: #1227739

Description of the change

Set the visibility state on the mir surface attached to the application during suspend/resume states.

By setting the visibility state (hide) of the mir surface during an appilcation suspend state, mir can avoid compositing the surface regardless of opaqueness and alpha pixel format.

fixes: lp: #1227739

To post a comment you must log in.
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

+ 16ff and +28 I believe you can achieve the same with less code - simply call session()->hide() and session()->show(); Additionally it would then also work for sessions that have more than one surface.

review: Needs Fixing
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

> + 16ff and +28 I believe you can achieve the same with less code - simply call
> session()->hide() and session()->show(); Additionally it would then also work
> for sessions that have more than one surface.

Right you are; I updated the change with your suggestion.

Revision history for this message
Andreas Pokorny (andreas-pokorny) :
review: Approve
Revision history for this message
Gerry Boland (gerboland) :
review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

@Alberto: please add in the description the review checklist questions & your answers from https://wiki.ubuntu.com/Process/Merges/Checklists/Unity-Mir

Here's my corresponding review checklist:

• Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

• Did CI run pass? If not, please explain why.
It did

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, used unity8 as a test run.

 * Did CI run pass? If not, please explain why.
I have not run it and Jenkins bot as reviewer seems to never run.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
175. By Alberto Aguirre

Fix application manager test failure

176. By Alberto Aguirre

merge lp:unity-mir

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, ran unity8; I confirmed app surfaces are not rendered when app is on resume state.

• Did CI run pass? If not, please explain why.
Yes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/application.cpp'
2--- src/modules/Unity/Application/application.cpp 2014-01-27 11:29:44 +0000
3+++ src/modules/Unity/Application/application.cpp 2014-02-20 23:59:42 +0000
4@@ -171,6 +171,9 @@
5 case Application::Suspended:
6 if (m_state == Application::Running) {
7 session()->set_lifecycle_state(mir_lifecycle_state_will_suspend);
8+
9+ session()->hide();
10+
11 m_suspendTimer->start(3000);
12 }
13 break;
14@@ -181,6 +184,7 @@
15 if (m_state == Application::Suspended) {
16 resume();
17 session()->set_lifecycle_state(mir_lifecycle_state_resumed);
18+ session()->show();
19 } else if (m_state == Application::Stopped) {
20 respawn();
21 state = Application::Starting;

Subscribers

People subscribed via source and target branches