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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3979
Proposed branch: lp:~azzar1/unity/fix-lp-1450991
Merge into: lp:unity
Diff against target: 74 lines (+16/-4)
2 files modified
launcher/Launcher.cpp (+15/-3)
launcher/Launcher.h (+1/-1)
To merge this branch: bzr merge lp:~azzar1/unity/fix-lp-1450991
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+259921@code.launchpad.net

Commit message

Fix a regression with urgent icons not showing up if launcher is hidden.

Description of the change

Fix a regression with urgent icons not showing up if launcher is hidden.

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
Stephen M. Webb (bregma) :
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 2015-04-16 14:38:54 +0000
3+++ launcher/Launcher.cpp 2015-05-22 12:33:34 +0000
4@@ -686,6 +686,11 @@
5 float present_progress = icon->GetQuirkProgress(AbstractLauncherIcon::Quirk::PRESENTED, monitor());
6 icon_hide_offset *= 1.0f - (present_progress * icon->PresentUrgency());
7
8+ if (present_progress > 0.0f)
9+ {
10+ parent_->ShowWindow(true);
11+ }
12+
13 // icon is crossing threshold, start folding
14 center.z += folded_z_distance * folding_progress;
15 arg.rotation.x = animation_neg_rads * folding_progress;
16@@ -738,7 +743,7 @@
17 }
18
19 void Launcher::RenderArgs(std::list<RenderArg> &launcher_args,
20- nux::Geometry& box_geo, float* launcher_alpha, nux::Geometry const& parent_abs_geo)
21+ nux::Geometry& box_geo, float* launcher_alpha, nux::Geometry const& parent_abs_geo, bool& force_show_window)
22 {
23 nux::Geometry const& geo = GetGeometry();
24 LauncherModel::iterator it;
25@@ -912,6 +917,8 @@
26 folding_threshold += shelf_delta;
27 center.y += shelf_delta;
28
29+ force_show_window = false;
30+
31 for (it = model_->shelf_begin(); it != model_->shelf_end(); ++it)
32 {
33 RenderArg arg;
34@@ -921,6 +928,9 @@
35 autohide_offset, folded_z_distance, animation_neg_rads);
36 arg.colorify = colorify;
37 launcher_args.push_back(arg);
38+
39+ if (autohide_offset != 0)
40+ force_show_window = true;
41 }
42 }
43
44@@ -1680,13 +1690,15 @@
45 ROP.SrcBlend = GL_ONE;
46 ROP.DstBlend = GL_ONE_MINUS_SRC_ALPHA;
47
48+ bool force_show_window;
49 nux::Geometry const& geo_absolute = GetAbsoluteGeometry();
50- RenderArgs(args, bkg_box, &launcher_alpha, geo_absolute);
51+ RenderArgs(args, bkg_box, &launcher_alpha, geo_absolute, force_show_window);
52 bkg_box.width -= RIGHT_LINE_WIDTH.CP(cv_);
53
54 if (options()->hide_mode != LAUNCHER_HIDE_NEVER &&
55 bkg_box.x + bkg_box.width <= 0 &&
56- hide_machine_.reveal_progress <= 0)
57+ hide_machine_.reveal_progress <= 0 &&
58+ !force_show_window)
59 {
60 parent_->ShowWindow(false);
61 }
62
63=== modified file 'launcher/Launcher.h'
64--- launcher/Launcher.h 2015-04-15 15:45:22 +0000
65+++ launcher/Launcher.h 2015-05-22 12:33:34 +0000
66@@ -265,7 +265,7 @@
67 float animation_neg_rads);
68
69 void RenderArgs(std::list<ui::RenderArg> &launcher_args,
70- nux::Geometry& box_geo, float* launcher_alpha, nux::Geometry const& parent_abs_geo);
71+ nux::Geometry& box_geo, float* launcher_alpha, nux::Geometry const& parent_abs_geo, bool& force_show_window);
72
73 void OnIconAdded(AbstractLauncherIcon::Ptr const& icon);
74 void OnIconRemoved(AbstractLauncherIcon::Ptr const& icon);