]> git.sur5r.net Git - i3/i3/blobdiff - src/con.c
Merge branch 'master' into next
[i3/i3] / src / con.c
index 79872f9251d64fa7cd4aabd07b8a1be2a4d55bb5..ba14e06c66028083c46da87a16c5f7ed0dc75562 100644 (file)
--- 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. */