Dont move single window from last workspace to a new one (#240)

Fix incorrect counting of windows when moving window to a new workspace.
This commit is contained in:
Adam Bieńkowski 2018-04-30 08:03:16 +02:00 committed by Rico Tzschichholz
parent a15dc07379
commit f1a491753a

View File

@ -504,7 +504,7 @@ namespace Gala
var next = active.get_neighbor (direction);
//dont allow empty workspaces to be created by moving, if we have dynamic workspaces
if (Prefs.get_dynamic_workspaces () && active.n_windows == 1 && next.index () == screen.n_workspaces - 1) {
if (Prefs.get_dynamic_workspaces () && Utils.get_n_windows (active) == 1 && next.index () == screen.n_workspaces - 1) {
Utils.bell (screen);
return;
}