Merge lp:~3v1n0/unity/launcher-actually-hide into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Christopher Townsend
Approved revision: no longer in the source branch.
Merged at revision: 3757
Proposed branch: lp:~3v1n0/unity/launcher-actually-hide
Merge into: lp:unity
Diff against target: 31 lines (+7/-0)
1 file modified
launcher/Launcher.cpp (+7/-0)
To merge this branch: bzr merge lp:~3v1n0/unity/launcher-actually-hide
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+213847@code.launchpad.net

Commit message

Launcher: hide the launcher window when in auto-hide mode if it's not presented

Description of the change

Having a basewindow around (visible) makes its to damage compiz all the times that something changes inside that, also if the content view is offscreen.

You can check this by using the show-repaint plugin in compiz.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

LGTM

review: Approve

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 2014-03-17 20:58:25 +0000
3+++ launcher/Launcher.cpp 2014-04-02 13:46:59 +0000
4@@ -1101,6 +1101,9 @@
5 postreveal_mousemove_delta_x_ = 0;
6 postreveal_mousemove_delta_y_ = 0;
7
8+ if (!hide_launcher)
9+ parent_->ShowWindow(true);
10+
11 if (nux::GetWindowThread()->IsEmbeddedWindow())
12 parent_->EnableInputWindow(!hide_launcher, launcher::window_title, false, false);
13
14@@ -1672,6 +1675,9 @@
15 RenderArgs(args, bkg_box, &launcher_alpha, geo_absolute);
16 bkg_box.width -= RIGHT_LINE_WIDTH.CP(cv_);
17
18+ if (options()->hide_mode != LAUNCHER_HIDE_NEVER && bkg_box.x + bkg_box.width <= 0)
19+ parent_->ShowWindow(false);
20+
21 nux::Color clear_colour = nux::Color(0x00000000);
22
23 // clear region
24@@ -1691,6 +1697,7 @@
25 GfxContext.PushClippingRectangle(nux::Geometry(base.x, bkg_box.y, base.width, bkg_box.height));
26
27 float reveal_progress = hide_machine_.reveal_progress;
28+
29 if ((reveal_progress > 0 || last_reveal_progress_ > 0) && launcher_pressure_effect_.IsValid())
30 {
31 if (std::abs(last_reveal_progress_ - reveal_progress) <= .1f)