From dfc28148df8df359f21fb073ec86523d28ec9715 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Wed, 13 Jun 2012 15:23:30 +0200 Subject: [PATCH] Fixed the problem when apps started from slingshot caused the current workspace to be removed --- src/Main.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Main.vala b/src/Main.vala index e30abe9b..b3a66ffe 100644 --- a/src/Main.vala +++ b/src/Main.vala @@ -119,7 +119,7 @@ namespace Gala Settings.get_default ().notify["enable-manager-corner"].connect (update_input_area); screen.get_workspaces ().foreach ((w) => { - w.window_removed.connect (() => check_workspaces (w)); + w.window_removed.connect ((win) => {if (win.window_type != WindowType.MENU) check_workspaces (w);}); w.window_added.connect (() => check_workspaces (w)); }); } @@ -242,15 +242,18 @@ namespace Gala /*FIXME using the MetaWindow to get the workspace directly did not work since they have already been destroyed when arriving here*/ + Timeout.add (500, () => { var screen = get_screen (); if (workspace.n_windows == 0 && moving == null) screen.remove_workspace (workspace, screen.get_display ().get_current_time ()); if (screen.get_workspace_by_index (screen.n_workspaces-1).n_windows != 0) { var new_w = screen.append_new_workspace (false, screen.get_display ().get_current_time ()); - new_w.window_removed.connect (() => check_workspaces (new_w)); + new_w.window_removed.connect ((w) => {if (w.window_type != WindowType.MENU) check_workspaces (new_w);}); new_w.window_added.connect (() => check_workspaces (new_w)); } + return false; + }); } public new void begin_modal ()