Benefits are that we don't open a fake container and don't call many
complicated functions that can lead to redraws (x_push_changes calls) as
discussed in #2954.
Fixes#2810:
Windows exchange floating mode & window rects.
Swap will still not work with CT_FLOATING_CONs but this doesn't make
much sense.
Fixes#3280:
The behaviour is not very user friendly but swap behaves exactly as it
should. The rest is a tree_flatten issue. Attached pictures in #2954.
- Use workspace_show that correctly updates _NET_CURRENT_DESKTOP, warps
mouse.
- Use TAILQ_INSERT_TAIL only for focus_head. Focus order is not related
to direction.
- Call con_focus only if con was focused before. See testcase for
directional move with command criteria.
- Correct first call of move_to_output_directed in tree_move which
didn't call ipc_send_window_event("move", con) and
ewmh_update_wm_desktop().
- Don't produce events when the move doesn't happen. Correct
276-ipc-window-move.t as well.
Explanation for the changed test:
After $third is switched to floating, the test moves focus to $second.
So, the parent of $second (the stacked container) is above $third in the
focus stack and it's children ($first, $second) should get focused
before $second. When $second is switched to floating the correct focus
order for the workspace should be $second->parent (floating con is the
parent) > $first->parent (stacked con) > $third.
Fixes#1975
Seems to be the intention, indicated by this comment (con.c:1307-1309):
/* For split containers, we use the currently focused container within it.
* This allows setting marks on, e.g., tabbed containers which will move
* con to a new tab behind the focused tab. */
Related to #3085.
con_next_focused uses con's parent. But since con can be inside an
unfocused container this means that one of it's siblings could become
focused in the current workspace.
Fixes:
- Issue where moving an urgent (unfocused) window resets it's urgency
hint.
- Moving an unfocused container to a new parent should not move it to
the top of the focus stack.