Make workspace_layout handle all cons at workspace level, not only the first one (+test)

This makes opening new windows on workspace level and moving windows to the
right/left more like in the old i3.
This commit is contained in:
Michael Stapelberg
2011-06-02 17:21:38 +02:00
parent 51bfdbf0a8
commit 1585d942ea
13 changed files with 262 additions and 40 deletions

View File

@ -7,7 +7,7 @@
* X11 IDs using x_con_init().
*
*/
Con *con_new(Con *parent);
Con *con_new(Con *parent, i3Window *window);
/**
* Sets input focus to the given container. Will be updated in X11 in the next

View File

@ -24,7 +24,7 @@ void tree_init();
* Opens an empty container in the current container
*
*/
Con *tree_open_con(Con *con);
Con *tree_open_con(Con *con, i3Window *window);
/**
* Splits (horizontally or vertically) the given container by creating a new

View File

@ -109,4 +109,16 @@ void workspace_update_urgent_flag(Con *ws);
*/
void ws_force_orientation(Con *ws, orientation_t orientation);
/**
* Called when a new con (with a window, not an empty or split con) should be
* attached to the workspace (for example when managing a new window or when
* moving an existing window to the workspace level).
*
* Depending on the workspace_layout setting, this function either returns the
* workspace itself (default layout) or creates a new stacked/tabbed con and
* returns that.
*
*/
Con *workspace_attach_to(Con *ws);
#endif