i3 - improved tiling WM


Bugfix: moving across outputs sends IPC event

Patch status: needinfo

Patch by Tony Crisci

Long description:

When moving a container across output with `move <direction>`, send the
IPC workspace focus event with `workspace_show` so that i3bar updates
correctly.

To apply this patch, use:
curl http://cr.i3wm.org/patch/365/raw.patch | git am

b/src/move.c

16
@@ -71,6 +71,7 @@ static void insert_con_into(Con *con, Con *target, position_t position) {
17
  *
18
  */
19
 static void attach_to_workspace(Con *con, Con *ws, direction_t direction) {
20
+    Con *old_ws = con_get_workspace(con);
21
     con_detach(con);
22
     con_fix_percent(con->parent);
23
 
24
@@ -91,6 +92,10 @@ static void attach_to_workspace(Con *con, Con *ws, direction_t direction) {
25
      * does not make sense anyways. */
26
     con->percent = 0.0;
27
     con_fix_percent(ws);
28
+
29
+    /* We do our best to get the IPC event right */
30
+    con_focus(old_ws);
31
+    workspace_show(ws);
32
 }
33
 
34
 /*