diff options
| -rw-r--r-- | targets/mutter/plugin.vala | 21 | ||||
| -rw-r--r-- | unity-private/panel/panel-window-buttons.vala | 8 | ||||
| -rw-r--r-- | vapi/Bamf-0.2.vapi | 4 |
3 files changed, 10 insertions, 23 deletions
diff --git a/targets/mutter/plugin.vala b/targets/mutter/plugin.vala index de3861210..80cfd4e1a 100644 --- a/targets/mutter/plugin.vala +++ b/targets/mutter/plugin.vala @@ -749,11 +749,7 @@ namespace Unity if (window.get_data<string> (UNDECORATED_HINT) == null) { uint32 xid = (uint32)window.get_x_window (); - - Idle.add (() => { - Utils.window_set_decorations (xid, 0); - return false; - }); + Utils.window_set_decorations (xid, 0); } this.window_maximized (this, window, x, y, width, height); @@ -770,11 +766,7 @@ namespace Unity if (window.get_data<string> (UNDECORATED_HINT) == null) { uint32 xid = (uint32)window.get_x_window (); - - Idle.add (() => { - Utils.window_set_decorations (xid, 1); - return false; - }); + Utils.window_set_decorations (xid, 1); } this.window_unmaximized (this, window, x, y, width, height); @@ -785,13 +777,8 @@ namespace Unity public void map (Mutter.Window window) { uint32 xid = (uint32)window.get_x_window (); - Idle.add (() => { - if (Utils.window_is_decorated (xid) == false) - { - window.set_data (UNDECORATED_HINT, "%s".printf ("true")); - } - return false; - }); + if (Utils.window_is_decorated (xid) == false) + window.set_data (UNDECORATED_HINT, "%s".printf ("true")); this.maximus.process_window (window); this.window_mapped (this, window); diff --git a/unity-private/panel/panel-window-buttons.vala b/unity-private/panel/panel-window-buttons.vala index 669b6f97b..053bd941f 100644 --- a/unity-private/panel/panel-window-buttons.vala +++ b/unity-private/panel/panel-window-buttons.vala @@ -85,7 +85,7 @@ namespace Unity.Panel /* Shell will let us know when something changes with the active window */ global_shell.active_window_state_changed.connect (() => { Timeout.add (0, () => { - Bamf.Window? win = matcher.get_active_window (); + unowned Bamf.Window? win = matcher.get_active_window (); on_active_window_changed (null, win as GLib.Object); return false; @@ -96,11 +96,11 @@ namespace Unity.Panel private void on_active_window_changed (GLib.Object? object, GLib.Object? object1) { - Bamf.View? new_view = object1 as Bamf.View; + unowned Bamf.View? new_view = object1 as Bamf.View; if (new_view is Bamf.Window) { - Bamf.Window win = new_view as Bamf.Window; + unowned Bamf.Window win = new_view as Bamf.Window; bool allows_resize = false; bool is_maximized = false; @@ -127,7 +127,7 @@ namespace Unity.Panel last_xid = win.get_xid (); - Bamf.Application? app = matcher.get_active_application (); + unowned Bamf.Application? app = matcher.get_active_application (); if (app is Bamf.Application) { /* We lookup sync because we know that the launcher has already diff --git a/vapi/Bamf-0.2.vapi b/vapi/Bamf-0.2.vapi index 07d6c719d..9b2f40937 100644 --- a/vapi/Bamf-0.2.vapi +++ b/vapi/Bamf-0.2.vapi @@ -35,8 +35,8 @@ namespace Bamf { public weak GLib.Object parent; public Bamf.MatcherPrivate priv; public bool application_is_running (string application); - public Bamf.Application get_active_application (); - public Bamf.Window get_active_window (); + public unowned Bamf.Application get_active_application (); + public unowned Bamf.Window get_active_window (); public Bamf.Application get_application_for_xid (uint32 xid); public GLib.List<weak uint32> get_applications (); public static unowned Bamf.Matcher get_default (); |
