Merge lp://qastaging/~mterry/unity-mir/dont-hide-focused-apps into lp://qastaging/unity-mir

Proposed by Michael Terry
Status: Merged
Approved by: Gerry Boland
Approved revision: 226
Merged at revision: 224
Proposed branch: lp://qastaging/~mterry/unity-mir/dont-hide-focused-apps
Merge into: lp://qastaging/unity-mir
Diff against target: 188 lines (+88/-10)
4 files modified
src/modules/Unity/Application/application.cpp (+0/-4)
src/modules/Unity/Application/application_manager.cpp (+12/-5)
src/modules/Unity/Application/application_manager.h (+1/-1)
tests/application_manager_test.cpp (+75/-0)
To merge this branch: bzr merge lp://qastaging/~mterry/unity-mir/dont-hide-focused-apps
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+220130@code.qastaging.launchpad.net

Commit message

Separate suspend logic from visibility logic, to allow top app to remain visible even when suspended.

Description of the change

Separate suspend logic from visibility logic, to allow top app to remain visible even when suspended.

When testing the split greeter, Saviq noticed that the user session would go black if an app was open while the greeter was up (sliding the greeter lets you peek at user session).

This is because unity-mir hides() app sessions when they are suspended to optimized compositing. But the top app should remain visible for cross-session compositing like the greeter wants to do.

So don't automatically hide() when suspending, but instead only hide() if we are unfocusing an app to bring another app above it.

(We still automatically show() when resuming because we want to ensure that the app is visible now.)

== Checklist ==
 * Are there any related MPs required for this MP to build/function as expected? Please list.
 - No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 - Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 - NA

To post a comment you must log in.
222. By Michael Terry

Separate suspend logic from visibility logic, to allow top app to remain visible even when suspended.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

It reads strange that you call setVisible(true) in Application, but setVisible(false) in ApplicationManager. Could you make this more consistent please?

I'd appreciate you adding a test or two, to verify nothing breaks.

review: Needs Fixing
223. By Michael Terry

Move setVisible call to application manager

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
224. By Michael Terry

Add some tests

Revision history for this message
Michael Terry (mterry) wrote :

OK, setVisible calls moved out, and a couple tests added.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

+ std::shared_ptr<mir::scene::Session> first_session = std::make_shared<MockSession>("Oo", a_procId);
The "Oo" not needed, jut an empty string will do

+ EXPECT_EQ(true, the_app->visible());
Could you please switch the arguments around?

Am testing now

225. By Michael Terry

Simplify test

Revision history for this message
Michael Terry (mterry) wrote :

> The "Oo" not needed, jut an empty string will do

Ah, OK. Fixed. Just copy and paste junk.

> Could you please switch the arguments around?

Really? Looking at the other tests, it seems common to have a "static value" on left and the interesting call on right.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

> > Could you please switch the arguments around?
>
> Really? Looking at the other tests, it seems common to have a "static value"
> on left and the interesting call on right.
Yeah sorry I know, I want to standardize things to the "value to check" and "correct value" order - see the newer tests I added recently.

226. By Michael Terry

Swap test value placement

Revision history for this message
Michael Terry (mterry) wrote :

Done.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Thank you. Approved!

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
Y

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches