X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcon.c;h=ba14e06c66028083c46da87a16c5f7ed0dc75562;hb=1dbdd4fece86c5f85bde54e40f58fa1a91810933;hp=79872f9251d64fa7cd4aabd07b8a1be2a4d55bb5;hpb=70d28bc7afb013de718969371d3a3671de4a9bfc;p=i3%2Fi3 diff --git a/src/con.c b/src/con.c index 79872f92..ba14e06c 100644 --- a/src/con.c +++ b/src/con.c @@ -51,6 +51,7 @@ Con *con_new_skeleton(Con *parent, i3Window *window) { Con *new = scalloc(sizeof(Con)); new->on_remove_child = con_on_remove_child; TAILQ_INSERT_TAIL(&all_cons, new, all_cons); + new->aspect_ratio = 0.0; new->type = CT_CON; new->window = window; new->border_style = config.default_border; @@ -568,8 +569,9 @@ void con_fix_percent(Con *con) { } /* - * Toggles fullscreen mode for the given container. Fullscreen mode will not be - * entered when there already is a fullscreen container on this workspace. + * Toggles fullscreen mode for the given container. If there already is a + * fullscreen container on this workspace, fullscreen will be disabled and then + * enabled for the container the user wants to have in fullscreen mode. * */ void con_toggle_fullscreen(Con *con, int fullscreen_mode) { @@ -1209,7 +1211,7 @@ void con_set_border_style(Con *con, int border_style, int border_width) { * new split container before). * */ -void con_set_layout(Con *con, int layout) { +void con_set_layout(Con *con, layout_t layout) { DLOG("con_set_layout(%p, %d), con->type = %d\n", con, layout, con->type); @@ -1353,8 +1355,9 @@ static void con_on_remove_child(Con *con) { * not be closed when the last child was removed */ if (con->type == CT_OUTPUT || con->type == CT_ROOT || - con->type == CT_DOCKAREA) { - DLOG("not handling, type = %d\n", con->type); + con->type == CT_DOCKAREA || + (con->parent != NULL && con->parent->type == CT_OUTPUT)) { + DLOG("not handling, type = %d, name = %s\n", con->type, con->name); return; } @@ -1369,6 +1372,8 @@ static void con_on_remove_child(Con *con) { } con_force_split_parents_redraw(con); + con->urgent = con_has_urgent_child(con); + con_update_parents_urgency(con); /* TODO: check if this container would swallow any other client and * don’t close it automatically. */