X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fmove.c;h=bd228a1cc19a19692f48e3f3dd7fb9b6c920f39a;hb=696d844ffa9a9532d9fa38c80961b5fba2ae1400;hp=9c0f310f769f641fc2dfb58e92446f269f78650e;hpb=e594086757d4d79cdfb963b1e5911bc37c34cade;p=i3%2Fi3 diff --git a/src/move.c b/src/move.c index 9c0f310f..bd228a1c 100644 --- a/src/move.c +++ b/src/move.c @@ -4,7 +4,7 @@ * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager - * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * * move.c: Moving containers into some direction. * @@ -128,7 +128,7 @@ static void move_to_output_directed(Con *con, direction_t direction) { tree_flatten(croot); - ipc_send_workspace_focus_event(ws, old_ws); + ipc_send_workspace_event("focus", ws, old_ws); } /* @@ -249,6 +249,14 @@ void tree_move(Con *con, int direction) { ? AFTER : BEFORE); insert_con_into(con, target, position); + } else if (con->parent->parent->type == CT_WORKSPACE && + con->parent->layout != L_DEFAULT && + con_num_children(con->parent) == 1) { + /* Con is the lone child of a non-default layout container at the edge + * of the workspace. Treat it as though the workspace is its parent + * and move it to the next output. */ + DLOG("Grandparent is workspace\n"); + move_to_output_directed(con, direction); } else { DLOG("Moving into container above\n"); position = (direction == D_UP || direction == D_LEFT ? BEFORE : AFTER);