DLOG("parent container killed\n");
}
+ if (ws == con) {
+ DLOG("Closing a workspace container, updating EWMH atoms\n");
+ ewmh_update_number_of_desktops();
+ ewmh_update_desktop_names();
+ ewmh_update_wm_desktop();
+ }
+
con_free(con);
/* in the case of floating windows, we already focused another container
if (!workspace)
return false;
- Con *focus = con_descend_tiling_focused(workspace);
- if (focus == workspace) {
- focus = con_descend_focused(workspace);
+ /* Use descend_focused first to give higher priority to floating or
+ * tiling fullscreen containers. */
+ Con *focus = con_descend_focused(workspace);
+ if (focus->fullscreen_mode == CF_NONE) {
+ Con *focus_tiling = con_descend_tiling_focused(workspace);
+ /* If descend_tiling returned a workspace then focus is either a
+ * floating container or the same workspace. */
+ if (focus_tiling != workspace) {
+ focus = focus_tiling;
+ }
}
workspace_show(workspace);