]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/ipc.html
release i3 v4.4
[i3/i3.github.io] / docs / ipc.html
index 0459e526fa0b3c766f0e7db3c3856e4a175ac11d..a5a58175a6984a650393c60f57567b19a2386d67 100644 (file)
@@ -1112,10 +1112,29 @@ if ($is_event) {
 <div class="paragraph"><p>This event consists of a single serialized map containing a property\r
 <tt>change (string)</tt> which indicates the type of the change ("focus", "init",\r
 "empty", "urgent").</p></div>\r
+<div class="paragraph"><p>Moreover, when the change is "focus", an <tt>old (object)</tt> and a <tt>current\r
+(object)</tt> properties will be present with the previous and current\r
+workspace respectively.  When the first switch occurs (when i3 focuses\r
+the workspace visible at the beginning) there is no previous\r
+workspace, and the <tt>old</tt> property will be set to <tt>null</tt>.  Also note\r
+that if the previous is empty it will get destroyed when switching,\r
+but will still be present in the "old" property.</p></div>\r
 <div class="paragraph"><p><strong>Example:</strong></p></div>\r
 <div class="listingblock">\r
 <div class="content">\r
-<pre><tt>{ "change": "focus" }</tt></pre>\r
+<pre><tt>{\r
+ "change": "focus",\r
+ "current": {\r
+  "id": 28489712,\r
+  "type":4,\r
+  ...\r
+ }\r
+ "old": {\r
+  "id": 28489715,\r
+  "type": 4,\r
+  ...\r
+ }\r
+}</tt></pre>\r
 </div></div>\r
 </div>\r
 <div class="sect2">\r