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
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2012-07-16 17:08:29 +0000
3+++ launcher/Launcher.cpp 2012-07-27 11:51:19 +0000
4@@ -91,7 +91,6 @@
5 const float DRAG_OUT_PIXELS = 300.0f;
6
7 const std::string DND_CHECK_TIMEOUT = "dnd-check-timeout";
8-const std::string STRUT_HACK_TIMEOUT = "strut-hack-timeout";
9 const std::string START_DRAGICON_TIMEOUT = "start-dragicon-timeout";
10 const std::string SCROLL_TIMEOUT = "scroll-timeout";
11 const std::string ANIMATION_IDLE = "animation-idle";
12@@ -1430,17 +1429,6 @@
13
14 /* End Launcher Show/Hide logic */
15
16-// Hacks around compiz failing to see the struts because the window was just mapped.
17-bool Launcher::StrutHack()
18-{
19- _parent->InputWindowEnableStruts(false);
20-
21- if (options()->hide_mode == LAUNCHER_HIDE_NEVER)
22- _parent->InputWindowEnableStruts(true);
23-
24- return false;
25-}
26-
27 void Launcher::OnOptionsChanged(Options::Ptr options)
28 {
29 UpdateOptions(options);
30@@ -1482,12 +1470,6 @@
31 else
32 {
33 _parent->EnableInputWindow(true, launcher::window_title, false, false);
34-
35- if (!sources_.GetSource(STRUT_HACK_TIMEOUT))
36- {
37- sources_.AddTimeout(1000, sigc::mem_fun(this, &Launcher::StrutHack), STRUT_HACK_TIMEOUT);
38- }
39-
40 _parent->InputWindowEnableStruts(true);
41 }
42
43
44=== modified file 'launcher/Launcher.h'
45--- launcher/Launcher.h 2012-07-16 17:08:29 +0000
46+++ launcher/Launcher.h 2012-07-27 11:51:19 +0000
47@@ -193,7 +193,6 @@
48
49 void OnSelectionChanged(AbstractLauncherIcon::Ptr selection);
50
51- bool StrutHack();
52 bool StartIconDragTimeout();
53 bool OnScrollTimeout();
54 bool OnUpdateDragManagerTimeout();
55
56=== modified file 'manual-tests/Launcher.txt'
57--- manual-tests/Launcher.txt 2012-07-25 08:38:07 +0000
58+++ manual-tests/Launcher.txt 2012-07-27 11:51:19 +0000
59@@ -663,3 +663,16 @@
60
61 Expected Result:
62 * The launcher should autoscroll so you can reach the trash icon.
63+
64+
65+No flickering when resizing the launcher
66+----------------------------------------
67+Actions:
68+ * Open gedit.
69+ * Maximize it. Make sure it remains maximized during the test.
70+ * Open Appearance panel in System Settings.
71+ * Change Launcher Icon Size.
72+
73+Expected Results:
74+ * The gedit window must not flicker behind the launcher.
75+