Merge lp:~azzar1/unity/fix-1024113 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2525
Proposed branch: lp:~azzar1/unity/fix-1024113
Merge into: lp:unity
Diff against target: 75 lines (+13/-19)
3 files modified
launcher/Launcher.cpp (+0/-18)
launcher/Launcher.h (+0/-1)
manual-tests/Launcher.txt (+13/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1024113
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Marco Trevisan (Treviño) Approve
jenkins (community) continuous-integration Approve
Review via email: mp+115726@code.launchpad.net

This proposal supersedes a proposal from 2012-07-12.

Commit message

Remove "strut hack" in launcher.cpp

Description of the change

== Problem ==
Screen flickers when changing launcher icon size.

== Fix ==
Remove "strut hack". I can't see any regressions without it.

== Test ==
Manual test.

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Fine!

review: Approve
Revision history for this message
Michal Hruby (mhr3) wrote :

The removal of the timer was causing that the strut wasn't applied in some cases after unity startup. A different fix for the flicker will need to be done.

review: Approve
Revision history for this message
Michal Hruby (mhr3) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2012-07-16 17:08:29 +0000
+++ launcher/Launcher.cpp 2012-07-27 11:51:19 +0000
@@ -91,7 +91,6 @@
91const float DRAG_OUT_PIXELS = 300.0f;91const float DRAG_OUT_PIXELS = 300.0f;
9292
93const std::string DND_CHECK_TIMEOUT = "dnd-check-timeout";93const std::string DND_CHECK_TIMEOUT = "dnd-check-timeout";
94const std::string STRUT_HACK_TIMEOUT = "strut-hack-timeout";
95const std::string START_DRAGICON_TIMEOUT = "start-dragicon-timeout";94const std::string START_DRAGICON_TIMEOUT = "start-dragicon-timeout";
96const std::string SCROLL_TIMEOUT = "scroll-timeout";95const std::string SCROLL_TIMEOUT = "scroll-timeout";
97const std::string ANIMATION_IDLE = "animation-idle";96const std::string ANIMATION_IDLE = "animation-idle";
@@ -1430,17 +1429,6 @@
14301429
1431/* End Launcher Show/Hide logic */1430/* End Launcher Show/Hide logic */
14321431
1433// Hacks around compiz failing to see the struts because the window was just mapped.
1434bool Launcher::StrutHack()
1435{
1436 _parent->InputWindowEnableStruts(false);
1437
1438 if (options()->hide_mode == LAUNCHER_HIDE_NEVER)
1439 _parent->InputWindowEnableStruts(true);
1440
1441 return false;
1442}
1443
1444void Launcher::OnOptionsChanged(Options::Ptr options)1432void Launcher::OnOptionsChanged(Options::Ptr options)
1445{1433{
1446 UpdateOptions(options);1434 UpdateOptions(options);
@@ -1482,12 +1470,6 @@
1482 else1470 else
1483 {1471 {
1484 _parent->EnableInputWindow(true, launcher::window_title, false, false);1472 _parent->EnableInputWindow(true, launcher::window_title, false, false);
1485
1486 if (!sources_.GetSource(STRUT_HACK_TIMEOUT))
1487 {
1488 sources_.AddTimeout(1000, sigc::mem_fun(this, &Launcher::StrutHack), STRUT_HACK_TIMEOUT);
1489 }
1490
1491 _parent->InputWindowEnableStruts(true);1473 _parent->InputWindowEnableStruts(true);
1492 }1474 }
14931475
14941476
=== modified file 'launcher/Launcher.h'
--- launcher/Launcher.h 2012-07-16 17:08:29 +0000
+++ launcher/Launcher.h 2012-07-27 11:51:19 +0000
@@ -193,7 +193,6 @@
193193
194 void OnSelectionChanged(AbstractLauncherIcon::Ptr selection);194 void OnSelectionChanged(AbstractLauncherIcon::Ptr selection);
195195
196 bool StrutHack();
197 bool StartIconDragTimeout();196 bool StartIconDragTimeout();
198 bool OnScrollTimeout();197 bool OnScrollTimeout();
199 bool OnUpdateDragManagerTimeout();198 bool OnUpdateDragManagerTimeout();
200199
=== modified file 'manual-tests/Launcher.txt'
--- manual-tests/Launcher.txt 2012-07-25 08:38:07 +0000
+++ manual-tests/Launcher.txt 2012-07-27 11:51:19 +0000
@@ -663,3 +663,16 @@
663663
664Expected Result:664Expected Result:
665 * The launcher should autoscroll so you can reach the trash icon.665 * The launcher should autoscroll so you can reach the trash icon.
666
667
668No flickering when resizing the launcher
669----------------------------------------
670Actions:
671 * Open gedit.
672 * Maximize it. Make sure it remains maximized during the test.
673 * Open Appearance panel in System Settings.
674 * Change Launcher Icon Size.
675
676Expected Results:
677 * The gedit window must not flicker behind the launcher.
678