|
|
|
@ -406,14 +406,19 @@ swayc_t *swayc_active_workspace_for(swayc_t *cont) {
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
switch (cont->type) {
|
|
|
|
|
/* set root -> output */
|
|
|
|
|
case C_ROOT: cont = cont->focused;
|
|
|
|
|
/* set output -> workspace */
|
|
|
|
|
case C_OUTPUT: cont = cont->focused;
|
|
|
|
|
/* return workspace */
|
|
|
|
|
case C_WORKSPACE: return cont;
|
|
|
|
|
/* Find parent workspace */
|
|
|
|
|
default: return swayc_parent_by_type(cont, C_WORKSPACE);
|
|
|
|
|
case C_ROOT:
|
|
|
|
|
cont = cont->focused;
|
|
|
|
|
/* Fallthrough */
|
|
|
|
|
|
|
|
|
|
case C_OUTPUT:
|
|
|
|
|
cont = cont->focused;
|
|
|
|
|
/* Fallthrough */
|
|
|
|
|
|
|
|
|
|
case C_WORKSPACE:
|
|
|
|
|
return cont;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return swayc_parent_by_type(cont, C_WORKSPACE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|