Merge lp:~3v1n0/unity/scale-crash-fix-1052683 into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2714
Proposed branch: lp:~3v1n0/unity/scale-crash-fix-1052683
Merge into: lp:unity
Diff against target: 35 lines (+4/-3)
2 files modified
plugins/unityshell/src/unityshell.cpp (+2/-2)
plugins/unityshell/src/unityshell.h (+2/-1)
To merge this branch: bzr merge lp:~3v1n0/unity/scale-crash-fix-1052683
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Review via email: mp+125063@code.launchpad.net

Commit message

UnityWindow: implements sigc::trackable

Description of the change

UnityWindow connects to signals using sigc::mem_fun, we should inherit from sigc::trackable to be sure that the signals get disconnected properly.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good to me . +1

review: Approve
Revision history for this message
Omer Akram (om26er) wrote :

fix for 6.0 please ;-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-09-18 18:53:43 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-09-18 22:00:25 +0000
4@@ -3682,7 +3682,7 @@
5
6 void UnityWindow::OnInitiateSpreed()
7 {
8- auto const windows = screen->windows();
9+ auto const& windows = screen->windows();
10 if (std::find(windows.begin(), windows.end(), window) == windows.end())
11 return;
12
13@@ -3698,7 +3698,7 @@
14
15 void UnityWindow::OnTerminateSpreed()
16 {
17- auto const windows = screen->windows();
18+ auto const& windows = screen->windows();
19 if (std::find(windows.begin(), windows.end(), window) == windows.end())
20 return;
21
22
23=== modified file 'plugins/unityshell/src/unityshell.h'
24--- plugins/unityshell/src/unityshell.h 2012-09-18 01:41:46 +0000
25+++ plugins/unityshell/src/unityshell.h 2012-09-18 22:00:25 +0000
26@@ -344,7 +344,8 @@
27 public compiz::WindowInputRemoverLockAcquireInterface,
28 public WrapableHandler<ScaleWindowInterface, 4>,
29 public BaseSwitchWindow,
30- public PluginClassHandler <UnityWindow, CompWindow>
31+ public PluginClassHandler <UnityWindow, CompWindow>,
32+ public sigc::trackable
33 {
34 public:
35 UnityWindow(CompWindow*);