xinerama: correctly put windows which are assigned to a specific screen on that screen when it becomes available (Thanks badboy)

This commit is contained in:
Michael Stapelberg
2009-12-21 22:30:08 +01:00
parent 0b5554c762
commit e900a8d23d
5 changed files with 86 additions and 34 deletions

View File

@ -44,6 +44,17 @@ bool workspace_is_visible(Workspace *ws);
/** Switches to the given workspace */
void workspace_show(xcb_connection_t *conn, int workspace);
/**
* Assigns the given workspace to the given screen by correctly updating its
* state and reconfiguring all the clients on this workspace.
*
* This is called when initializing a screen and when re-assigning it to a
* different screen which just got available (if you configured it to be on
* screen 1 and you just plugged in screen 1).
*
*/
void workspace_assign_to(Workspace *ws, i3Screen *screen);
/**
* Initializes the given workspace if it is not already initialized. The given
* screen is to be understood as a fallback, if the workspace itself either
@ -51,7 +62,7 @@ void workspace_show(xcb_connection_t *conn, int workspace);
* the screen is not attached at the moment.
*
*/
void workspace_initialize(Workspace *ws, i3Screen *screen);
void workspace_initialize(Workspace *ws, i3Screen *screen, bool recheck);
/**
* Gets the first unused workspace for the given screen, taking into account