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
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-09-18 18:53:43 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-09-18 22:00:25 +0000
@@ -3682,7 +3682,7 @@
36823682
3683void UnityWindow::OnInitiateSpreed()3683void UnityWindow::OnInitiateSpreed()
3684{3684{
3685 auto const windows = screen->windows();3685 auto const& windows = screen->windows();
3686 if (std::find(windows.begin(), windows.end(), window) == windows.end())3686 if (std::find(windows.begin(), windows.end(), window) == windows.end())
3687 return;3687 return;
36883688
@@ -3698,7 +3698,7 @@
36983698
3699void UnityWindow::OnTerminateSpreed()3699void UnityWindow::OnTerminateSpreed()
3700{3700{
3701 auto const windows = screen->windows();3701 auto const& windows = screen->windows();
3702 if (std::find(windows.begin(), windows.end(), window) == windows.end())3702 if (std::find(windows.begin(), windows.end(), window) == windows.end())
3703 return;3703 return;
37043704
37053705
=== modified file 'plugins/unityshell/src/unityshell.h'
--- plugins/unityshell/src/unityshell.h 2012-09-18 01:41:46 +0000
+++ plugins/unityshell/src/unityshell.h 2012-09-18 22:00:25 +0000
@@ -344,7 +344,8 @@
344 public compiz::WindowInputRemoverLockAcquireInterface,344 public compiz::WindowInputRemoverLockAcquireInterface,
345 public WrapableHandler<ScaleWindowInterface, 4>,345 public WrapableHandler<ScaleWindowInterface, 4>,
346 public BaseSwitchWindow,346 public BaseSwitchWindow,
347 public PluginClassHandler <UnityWindow, CompWindow>347 public PluginClassHandler <UnityWindow, CompWindow>,
348 public sigc::trackable
348{349{
349public:350public:
350 UnityWindow(CompWindow*);351 UnityWindow(CompWindow*);