Merge lp:~unity-team/unity/unity.fix-bottom-right-dash-decoration-corner into lp:unity

Proposed by Mirco Müller on 2012-04-06
Status: Merged
Approved by: Andrea Cimitan on 2012-04-06
Approved revision: 2246
Merged at revision: 2248
Proposed branch: lp:~unity-team/unity/unity.fix-bottom-right-dash-decoration-corner
Merge into: lp:unity
Diff against target: 71 lines (+20/-0)
3 files modified
plugins/unityshell/src/LensBar.cpp (+8/-0)
plugins/unityshell/src/OverlayRenderer.cpp (+9/-0)
plugins/unityshell/src/UBusMessages.h (+3/-0)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-bottom-right-dash-decoration-corner
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) 2012-04-06 Approve on 2012-04-06
Review via email: mp+101089@code.launchpad.net

Commit Message

Make sure the special masking of the dash's decoration is restored when a repaint of the lens-nav-bar destroyed it.

Description of the Change

Make sure the special masking of the dash's decoration is restored when a repaint of the lens-nav-bar destroyed it.

To post a comment you must log in.
Andrea Cimitan (cimi) wrote :

tested works fine, code ok.

review: Approve

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-02 21:17:19 +0000
3+++ plugins/unityshell/src/LensBar.cpp 2012-04-06 10:56:19 +0000
4@@ -22,6 +22,8 @@
5 #include "CairoTexture.h"
6 #include "DashStyle.h"
7 #include "LensBar.h"
8+#include "UBusMessages.h"
9+#include "UBusWrapper.h"
10
11 namespace unity
12 {
13@@ -147,6 +149,12 @@
14 }
15
16 gfx_context.PopClippingRectangle();
17+
18+ // trigger a redraw of the decoration, as the special masking of the
19+ // decoration is usually destroyed by the clipping-rects/previous paints
20+ ubus_server_send_message(ubus_server_get_default(),
21+ UBUS_DASH_DECORATION_DAMAGED,
22+ NULL);
23 }
24
25 void LensBar::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw)
26
27=== modified file 'plugins/unityshell/src/OverlayRenderer.cpp'
28--- plugins/unityshell/src/OverlayRenderer.cpp 2012-04-05 22:01:14 +0000
29+++ plugins/unityshell/src/OverlayRenderer.cpp 2012-04-06 10:56:19 +0000
30@@ -50,6 +50,7 @@
31
32 void Init();
33 void OnBackgroundColorChanged(GVariant* args);
34+ void OnDashDecorationDamanged(GVariant* args);
35
36 void Draw(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry, bool force_draw);
37 void DrawContent(nux::GraphicsEngine& gfx_context, nux::Geometry content_geo, nux::Geometry absolute_geo, nux::Geometry geometry);
38@@ -116,6 +117,9 @@
39 ubus_manager_.RegisterInterest(UBUS_BACKGROUND_COLOR_CHANGED,
40 sigc::mem_fun(this, &OverlayRendererImpl::OnBackgroundColorChanged));
41
42+ ubus_manager_.RegisterInterest(UBUS_DASH_DECORATION_DAMAGED,
43+ sigc::mem_fun(this, &OverlayRendererImpl::OnDashDecorationDamanged));
44+
45 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);
46 }
47
48@@ -131,6 +135,11 @@
49 parent->need_redraw.emit();
50 }
51
52+void OverlayRendererImpl::OnDashDecorationDamanged(GVariant* args)
53+{
54+ parent->need_redraw.emit();
55+}
56+
57 void OverlayRendererImpl::InitASMInverseTextureMaskShader()
58 {
59 nux::NString AsmVtx =
60
61=== modified file 'plugins/unityshell/src/UBusMessages.h'
62--- plugins/unityshell/src/UBusMessages.h 2012-03-30 13:01:12 +0000
63+++ plugins/unityshell/src/UBusMessages.h 2012-04-06 10:56:19 +0000
64@@ -90,4 +90,7 @@
65 #define UBUS_SWITCHER_SHOWN "SWITCHER_SHOWN"
66 #define UBUS_SWITCHER_SELECTION_CHANGED "SWITCHER_SELECTION_CHANGED"
67
68+// Signal sent when someone thinks the decoration might got damanged by a paint
69+#define UBUS_DASH_DECORATION_DAMAGED "DASH_DECORATION_DAMAGED"
70+
71 #endif // UBUS_MESSAGES_H