Merge lp:~3v1n0/unity/session-hide-overlays into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3237
Proposed branch: lp:~3v1n0/unity/session-hide-overlays
Merge into: lp:unity
Prerequisite: lp:~3v1n0/unity/session-keyselect-default-button
Diff against target: 42 lines (+13/-0)
2 files modified
shutdown/SessionController.cpp (+1/-0)
tests/test_session_controller.cpp (+12/-0)
To merge this branch: bzr merge lp:~3v1n0/unity/session-hide-overlays
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+154169@code.launchpad.net

This proposal supersedes a proposal from 2013-03-19.

Commit message

SessionController: request overlay hiding on session view show

Description of the change

Make the session controller to request overlay hiding on show.

Test added.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shutdown/SessionController.cpp'
2--- shutdown/SessionController.cpp 2013-03-19 18:43:22 +0000
3+++ shutdown/SessionController.cpp 2013-03-19 18:43:23 +0000
4@@ -91,6 +91,7 @@
5 if (Visible() && mode == view_->mode())
6 return;
7
8+ ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST);
9 WindowManager::Default().SaveInputFocus();
10
11 if (nux::GetWindowThread()->IsEmbeddedWindow())
12
13=== modified file 'tests/test_session_controller.cpp'
14--- tests/test_session_controller.cpp 2013-03-19 18:43:22 +0000
15+++ tests/test_session_controller.cpp 2013-03-19 18:43:23 +0000
16@@ -22,7 +22,9 @@
17 #include <NuxCore/AnimationController.h>
18 #include "test_mock_session_manager.h"
19 #include "SessionController.h"
20+#include "UBusMessages.h"
21 #include "UnitySettings.h"
22+#include "test_utils.h"
23
24 namespace unity
25 {
26@@ -74,6 +76,16 @@
27 EXPECT_TRUE(controller.view_->live_background());
28 }
29
30+TEST_P(/*TestSessionController*/ShowMode, RequestsHideOverlay)
31+{
32+ UBusManager ubus;
33+ bool request_hide = false;
34+ ubus.RegisterInterest(UBUS_PLACE_VIEW_CLOSE_REQUEST, [&request_hide] (GVariant*) { request_hide = true; });
35+
36+ controller.Show(GetParam());
37+ Utils::WaitUntilMSec(request_hide);
38+}
39+
40 TEST_F(TestSessionController, Hide)
41 {
42 controller.Show(View::Mode::FULL);