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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 2303
Proposed branch: lp:~azzar1/unity/fix-980924
Merge into: lp:unity
Diff against target: 105 lines (+3/-26)
4 files modified
plugins/unityshell/src/LensBar.cpp (+2/-14)
plugins/unityshell/src/LensBarIcon.cpp (+1/-0)
plugins/unityshell/src/OverlayRenderer.cpp (+0/-9)
plugins/unityshell/src/UBusMessages.h (+0/-3)
To merge this branch: bzr merge lp:~azzar1/unity/fix-980924
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+102200@code.launchpad.net

Commit message

Description of the change

== Problem ==
[regression] Dash keeps repainting unnecessarily

== Fix ==
Partially revert r2248 [1] without reintroducing the bottom-right bug.

[1] https://code.launchpad.net/~unity-team/unity/unity.fix-bottom-right-dash-decoration-corner

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

UBUS_DASH_DECORATION_DAMAGED isn't used anymore with this right? we should remove the UBUS message define and the signal connect in OverlayRenderer too

review: Needs Fixing
Revision history for this message
Andrea Azzarone (azzar1) wrote :

> UBUS_DASH_DECORATION_DAMAGED isn't used anymore with this right? we should
> remove the UBUS message define and the signal connect in OverlayRenderer too

Done.

Revision history for this message
Andrea Cimitan (cimi) wrote :

Fine for me now, waiting supergord.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

LGTM

review: Approve
Revision history for this message
Gord Allott (gordallott) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/668/console reported an error when processing this lp:~andyrock/unity/fix-980924 branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/LensBar.cpp'
2--- plugins/unityshell/src/LensBar.cpp 2012-04-10 16:47:01 +0000
3+++ plugins/unityshell/src/LensBar.cpp 2012-04-17 22:18:18 +0000
4@@ -21,8 +21,6 @@
5
6 #include "CairoTexture.h"
7 #include "LensBar.h"
8-#include "UBusMessages.h"
9-#include "UBusWrapper.h"
10
11 namespace unity
12 {
13@@ -75,9 +73,7 @@
14 layout_->AddView(icon, 0, nux::eCenter, nux::MINOR_SIZE_FULL);
15 AddChild(icon);
16
17- icon->mouse_click.connect([&, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); QueueDraw(); });
18- icon->mouse_down.connect([&] (int x, int y, unsigned long button, unsigned long keyboard) { QueueDraw(); });
19- icon->key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); });
20+ icon->mouse_click.connect([&, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); });
21 icon->key_nav_focus_activate.connect([&, icon](nux::Area*){ SetActive(icon); });
22 }
23
24@@ -90,9 +86,7 @@
25 layout_->AddView(icon, 0, nux::eCenter, nux::eFix);
26 AddChild(icon);
27
28- icon->mouse_click.connect([&, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); QueueDraw(); });
29- icon->mouse_down.connect([&] (int x, int y, unsigned long button, unsigned long keyboard) { QueueDraw(); });
30- icon->key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); });
31+ icon->mouse_click.connect([&, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); });
32 icon->key_nav_focus_activate.connect([&, icon](nux::Area*){ SetActive(icon); });
33 }
34
35@@ -119,12 +113,6 @@
36 nux::GetPainter().RenderSinglePaintLayer(gfx_context, base, bg_layer_.get());
37
38 gfx_context.PopClippingRectangle();
39-
40- // trigger a redraw of the decoration, as the special masking of the
41- // decoration is usually destroyed by the clipping-rects/previous paints
42- ubus_server_send_message(ubus_server_get_default(),
43- UBUS_DASH_DECORATION_DAMAGED,
44- NULL);
45 }
46
47 void LensBar::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw)
48
49=== modified file 'plugins/unityshell/src/LensBarIcon.cpp'
50--- plugins/unityshell/src/LensBarIcon.cpp 2012-04-10 16:23:46 +0000
51+++ plugins/unityshell/src/LensBarIcon.cpp 2012-04-17 22:18:18 +0000
52@@ -57,6 +57,7 @@
53 SetAcceptKeyNavFocusOnMouseEnter(true);
54
55 active.changed.connect(sigc::mem_fun(this, &LensBarIcon::OnActiveChanged));
56+ key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); });
57 }
58
59 LensBarIcon::~LensBarIcon()
60
61=== modified file 'plugins/unityshell/src/OverlayRenderer.cpp'
62--- plugins/unityshell/src/OverlayRenderer.cpp 2012-04-17 09:59:00 +0000
63+++ plugins/unityshell/src/OverlayRenderer.cpp 2012-04-17 22:18:18 +0000
64@@ -50,7 +50,6 @@
65
66 void Init();
67 void OnBackgroundColorChanged(GVariant* args);
68- void OnDashDecorationDamanged(GVariant* args);
69
70 void Draw(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry, bool force_draw);
71 void DrawContent(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry);
72@@ -117,9 +116,6 @@
73 ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED,
74 sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged));
75
76- ubus_manager_.RegisterInterest(UBUS_DASH_DECORATION_DAMAGED,
77- sigc::mem_fun(this, &OverlayRendererImpl::OnDashDecorationDamanged));
78-
79 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);
80 }
81
82@@ -135,11 +131,6 @@
83 parent->need_redraw.emit();
84 }
85
86-void OverlayRendererImpl::OnDashDecorationDamanged(GVariant* args)
87-{
88- parent->need_redraw.emit();
89-}
90-
91 void OverlayRendererImpl::InitASMInverseTextureMaskShader()
92 {
93 nux::NString AsmVtx =
94
95=== modified file 'plugins/unityshell/src/UBusMessages.h'
96--- plugins/unityshell/src/UBusMessages.h 2012-04-06 10:50:00 +0000
97+++ plugins/unityshell/src/UBusMessages.h 2012-04-17 22:18:18 +0000
98@@ -90,7 +90,4 @@
99 #define UBUS_SWITCHER_SHOWN "SWITCHER_SHOWN"
100 #define UBUS_SWITCHER_SELECTION_CHANGED "SWITCHER_SELECTION_CHANGED"
101
102-// Signal sent when someone thinks the decoration might got damanged by a paint
103-#define UBUS_DASH_DECORATION_DAMAGED "DASH_DECORATION_DAMAGED"
104-
105 #endif // UBUS_MESSAGES_H