Bugfix: Correctly hide/show workspaces when enabling new outputs, correctly handle focus (Thanks Merovius)

This commit is contained in:
Michael Stapelberg
2010-03-05 15:22:12 +01:00
parent 718d62a3cd
commit 8b192ac7ed
4 changed files with 29 additions and 5 deletions

View File

@ -204,7 +204,7 @@ void workspace_show(xcb_connection_t *conn, int workspace) {
* output 1 and you just plugged in output 1).
*
*/
void workspace_assign_to(Workspace *ws, Output *output) {
void workspace_assign_to(Workspace *ws, Output *output, bool hide_it) {
Client *client;
bool empty = true;
bool visible = workspace_is_visible(ws);
@ -229,7 +229,7 @@ void workspace_assign_to(Workspace *ws, Output *output) {
render_workspace(global_conn, output, ws);
/* …unless we want to see them at the moment, we should hide that workspace */
if (visible)
if (visible && !hide_it)
return;
workspace_unmap_clients(global_conn, ws);
@ -269,7 +269,7 @@ void workspace_initialize(Workspace *ws, Output *output, bool recheck) {
if (old_output != NULL && ws->output == old_output)
return;
workspace_assign_to(ws, ws->output);
workspace_assign_to(ws, ws->output, false);
}
/*