Dont close the first workspace when it's emptied and it's the last used one to avoid confusing workspace movement

This commit is contained in:
Tom Beckmann 2012-07-25 01:30:58 +02:00
parent eaf74232bd
commit a8ec8dec50
2 changed files with 9 additions and 0 deletions

View File

@ -392,6 +392,10 @@ namespace Gala
return true;
}
//dont allow closing the tab if it's the last one used
if (workspace.index () == 0 && screen.n_workspaces == 2)
return false;
if (hover_timer > 0)
GLib.Source.remove (hover_timer);

View File

@ -161,6 +161,11 @@ namespace Gala
void remove_workspace (WorkspaceThumb thumb)
{
//if there's only one used left, remove the second one to avoid rather confusing workspace movement
if (thumb.workspace.index () == 0 && screen.n_workspaces == 2) {
return;
}
thumb.clicked.disconnect (hide);
thumb.closed.disconnect (remove_workspace);
thumb.window_on_last.disconnect (add_workspace);