Merge lp:~smspillaz/unity/unity.fix_931409 into lp:unity

Proposed by Sam Spilsbury
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 1970
Proposed branch: lp:~smspillaz/unity/unity.fix_931409
Merge into: lp:unity
Diff against target: 42 lines (+12/-9)
2 files modified
plugins/unityshell/src/compizminimizedwindowhandler.h (+0/-9)
plugins/unityshell/src/unityshell.cpp (+12/-0)
To merge this branch: bzr merge lp:~smspillaz/unity/unity.fix_931409
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+92907@code.launchpad.net

Description of the change

Fix bug 931409

Don't unset the handlers until the window is destroyed.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Tested.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/compizminimizedwindowhandler.h'
--- plugins/unityshell/src/compizminimizedwindowhandler.h 2012-02-13 03:27:45 +0000
+++ plugins/unityshell/src/compizminimizedwindowhandler.h 2012-02-14 04:41:55 +0000
@@ -104,15 +104,6 @@
104template <typename Screen, typename Window>104template <typename Screen, typename Window>
105compiz::CompizMinimizedWindowHandler<Screen, Window>::~CompizMinimizedWindowHandler ()105compiz::CompizMinimizedWindowHandler<Screen, Window>::~CompizMinimizedWindowHandler ()
106{106{
107 if (!priv->mWindow->destroyed ())
108 {
109 priv->mWindow->unminimize ();
110 priv->mWindow->focusSetEnabled (Window::get (priv->mWindow), false);
111 priv->mWindow->minimizeSetEnabled (Window::get (priv->mWindow), false);
112 priv->mWindow->unminimizeSetEnabled (Window::get (priv->mWindow), false);
113 priv->mWindow->minimize ();
114 }
115
116 minimizedWindows.remove (this);107 minimizedWindows.remove (this);
117}108}
118109
119110
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-02-13 21:44:54 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-02-14 04:41:55 +0000
@@ -2687,6 +2687,18 @@
2687 if (us->newFocusedWindow && (UnityWindow::get(us->newFocusedWindow) == this))2687 if (us->newFocusedWindow && (UnityWindow::get(us->newFocusedWindow) == this))
2688 us->newFocusedWindow = NULL;2688 us->newFocusedWindow = NULL;
26892689
2690 if (!window->destroyed ())
2691 {
2692 bool wasMinimized = window->minimized ();
2693 if (wasMinimized)
2694 window->unminimize ();
2695 window->focusSetEnabled (this, false);
2696 window->minimizeSetEnabled (this, false);
2697 window->unminimizeSetEnabled (this, false);
2698 if (wasMinimized)
2699 window->minimize ();
2700 }
2701
2690 UnityShowdesktopHandler::animating_windows.remove (window);2702 UnityShowdesktopHandler::animating_windows.remove (window);
26912703
2692 if (mShowdesktopHandler)2704 if (mShowdesktopHandler)