]> git.sur5r.net Git - i3/i3/commitdiff
Add "output" to IPC events referencing a container (#2489)
authorPeder Stray <peder.stray@gmail.com>
Wed, 19 Oct 2016 06:41:10 +0000 (08:41 +0200)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Wed, 19 Oct 2016 06:41:10 +0000 (08:41 +0200)
Add the property "output" to all IPC events that has an output container
as a parent, making it easier to keep track of such things.

fixes #2478

src/ipc.c

index bf529b17eec0837ccd5459f8dbd49bd55259bf9c..ddc09294c8a435414d155c2c09c4a38d7d66f3b0 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -294,6 +294,11 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
     ystr("focused");
     y(bool, (con == focused));
 
+    if (con->type != CT_ROOT && con->type != CT_OUTPUT) {
+        ystr("output");
+        ystr(con_get_output(con)->name);
+    }
+
     ystr("layout");
     switch (con->layout) {
         case L_DEFAULT: