Merge lp:~brandontschaefer/unity/skip-switcher-lazy-loading-timer into lp:unity

Proposed by Brandon Schaefer
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3019
Proposed branch: lp:~brandontschaefer/unity/skip-switcher-lazy-loading-timer
Merge into: lp:unity
Diff against target: 33 lines (+4/-1)
2 files modified
launcher/SwitcherController.cpp (+2/-1)
tests/test_switcher_controller.cpp (+2/-0)
To merge this branch: bzr merge lp:~brandontschaefer/unity/skip-switcher-lazy-loading-timer
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+142396@code.launchpad.net

Commit message

Comment out the lazy loading timer for the switcher, as we need real timing data to suggest this is necessary.

Description of the change

=== Problem ===
The switcher controller has a default 20 second delay to creating the window for it...this leads to windows losing focus when this happens. We really need to know if this is worthwhile to add all the complexity to check if the view has been created, when we will have to create it at some point anyway....so we need real timing data to suggest this.

=== Fix ===
Comment out the timer, and added a TODO (which will be happening soon).

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Yes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/SwitcherController.cpp'
2--- launcher/SwitcherController.cpp 2012-11-23 04:05:35 +0000
3+++ launcher/SwitcherController.cpp 2013-01-08 20:34:22 +0000
4@@ -57,7 +57,8 @@
5 {
6 ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED, sigc::mem_fun(this, &Controller::OnBackgroundUpdate));
7
8- sources_.AddTimeoutSeconds(construct_timeout_, [&] { ConstructWindow(); return false; }, LAZY_TIMEOUT);
9+ // TODO We need to get actual timing data to suggest this is necessary.
10+ //sources_.AddTimeoutSeconds(construct_timeout_, [&] { ConstructWindow(); return false; }, LAZY_TIMEOUT);
11 }
12
13 void Controller::OnBackgroundUpdate(GVariant* data)
14
15=== modified file 'tests/test_switcher_controller.cpp'
16--- tests/test_switcher_controller.cpp 2012-11-06 18:19:09 +0000
17+++ tests/test_switcher_controller.cpp 2013-01-08 20:34:22 +0000
18@@ -106,6 +106,7 @@
19 EXPECT_EQ(controller.GetConstructTimeout(), DEFAULT_LAZY_CONSTRUCT_TIMEOUT);
20 }
21
22+/*
23 TEST(TestSwitcherController, LazyWindowConstruction)
24 {
25 // Setting the timeout to a lower value to speed-up the test
26@@ -123,6 +124,7 @@
27 Utils::WaitUntil(controller.window_constructed_, controller.GetConstructTimeout() + 1);
28 EXPECT_TRUE(controller.window_constructed_);
29 }
30+*/
31
32 TEST(TestSwitcherController, InitialDetailTimeout)
33 {