Compare commits

...

2 Commits

2 changed files with 8 additions and 1 deletions

View File

@ -40,6 +40,7 @@ state INITIAL:
'assign' -> ASSIGN
'no_focus' -> NO_FOCUS
'focus_follows_mouse' -> FOCUS_FOLLOWS_MOUSE
'empty_workspaces' -> EMPTY_WORKSPACES
'mouse_warping' -> MOUSE_WARPING
'focus_wrapping' -> FOCUS_WRAPPING
'force_focus_wrapping' -> FORCE_FOCUS_WRAPPING
@ -269,6 +270,11 @@ state FOCUS_FOLLOWS_MOUSE:
value = word
-> call cfg_focus_follows_mouse($value)
# empty_workspaces bool
state EMPTY_WORKSPACES:
value = word
-> call cfg_empty_workspaces($value)
# mouse_warping warping_t
state MOUSE_WARPING:
value = 'none', 'output'

View File

@ -2073,7 +2073,8 @@ static void con_on_remove_child(Con *con) {
/* For workspaces, close them only if they're not visible anymore */
if (con->type == CT_WORKSPACE) {
if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con)) {
if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con) &&
!config.empty_workspaces) {
LOG("Closing old workspace (%p / %s), it is empty\n", con, con->name);
yajl_gen gen = ipc_marshal_workspace_event("empty", con, NULL);
tree_close_internal(con, DONT_KILL_WINDOW, false);