Merge lp:~azzar1/unity/fix-1301394 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: 3939
Proposed branch: lp:~azzar1/unity/fix-1301394
Merge into: lp:unity
Diff against target: 38 lines (+13/-0)
1 file modified
launcher/Launcher.cpp (+13/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1301394
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+253825@code.launchpad.net

Commit message

Hide launcher to avoid damaging window when not needed. Also make sure that pressure effect works fine (previous fix has been reverted because of this!).

Description of the change

Hide launcher to avoid damaging window when not needed. Also make sure that pressure effect works fine (previous fix has been reverted because of this!).

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool, everything works as expected now!

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) :

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-12-12 22:33:24 +0000
3+++ launcher/Launcher.cpp 2015-03-23 14:20:29 +0000
4@@ -1108,6 +1108,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@@ -1681,6 +1684,13 @@
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 &&
19+ bkg_box.x + bkg_box.width <= 0 &&
20+ hide_machine_.reveal_progress <= 0)
21+ {
22+ parent_->ShowWindow(false);
23+ }
24+
25 nux::Color clear_colour = nux::Color(0x00000000);
26
27 // clear region
28@@ -2270,7 +2280,10 @@
29 return ui::EdgeBarrierSubscriber::Result::IGNORED;
30
31 if (!owner->IsFirstEvent())
32+ {
33+ parent_->ShowWindow(true);
34 hide_machine_.AddRevealPressure(event->velocity);
35+ }
36
37 return ui::EdgeBarrierSubscriber::Result::HANDLED;
38 }