Merge lp:~unity-team/unity/restore-foce-activate into lp:unity

Proposed by Jason Smith
Status: Merged
Approved by: Mirco Müller
Approved revision: no longer in the source branch.
Merged at revision: 531
Proposed branch: lp:~unity-team/unity/restore-foce-activate
Merge into: lp:unity
Diff against target: 33 lines (+16/-0)
1 file modified
targets/mutter/window-management.vala (+16/-0)
To merge this branch: bzr merge lp:~unity-team/unity/restore-foce-activate
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+36248@code.launchpad.net

Description of the change

Restores previous function changed to timeout. 30 minutes of testing could not reproduce the expected crash, it is presumed dead.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'targets/mutter/window-management.vala'
2--- targets/mutter/window-management.vala 2010-09-16 20:21:40 +0000
3+++ targets/mutter/window-management.vala 2010-09-22 04:14:00 +0000
4@@ -133,6 +133,21 @@
5 window.hide ();
6 this.plugin.plugin.minimize_completed (window);
7 }
8+
9+ private bool force_activate ()
10+ {
11+ if (this.last_mapped is Mutter.Window)
12+ {
13+ unowned Mutter.MetaWindow w = this.last_mapped.get_meta_window ();
14+ unowned Mutter.MetaDisplay d = Mutter.MetaWindow.get_display (w);
15+
16+ Mutter.MetaWindow.activate (this.last_mapped.get_meta_window (),
17+ Mutter.MetaDisplay.get_current_time (d));
18+ }
19+
20+ return false;
21+ }
22+
23
24 private void window_mapped (Plugin plugin, Mutter.Window window)
25 {
26@@ -155,6 +170,7 @@
27 Mutter.MetaWindow.get_user_time (
28 window.get_meta_window ()));
29 this.last_mapped = window;
30+ Timeout.add (0, this.force_activate);
31 }
32
33 Clutter.Animation anim = null;