mirror of
https://github.com/elementary/gala.git
synced 2024-09-19 19:37:14 +03:00
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:
parent
eaf74232bd
commit
a8ec8dec50
@ -392,6 +392,10 @@ namespace Gala
|
|||||||
return true;
|
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)
|
if (hover_timer > 0)
|
||||||
GLib.Source.remove (hover_timer);
|
GLib.Source.remove (hover_timer);
|
||||||
|
|
||||||
|
@ -161,6 +161,11 @@ namespace Gala
|
|||||||
|
|
||||||
void remove_workspace (WorkspaceThumb thumb)
|
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.clicked.disconnect (hide);
|
||||||
thumb.closed.disconnect (remove_workspace);
|
thumb.closed.disconnect (remove_workspace);
|
||||||
thumb.window_on_last.disconnect (add_workspace);
|
thumb.window_on_last.disconnect (add_workspace);
|
||||||
|
Loading…
Reference in New Issue
Block a user