Make sure sticky windows pop to the front if they get sticky while not being on a visible workspace.

This commit also reworks the way focusing sticky windows is prevented by not focusing them temporarily at all, but preventing the focus in the first place.
This commit is contained in:
Ingo Bürk
2015-08-26 21:06:53 +02:00
parent 23a1dadaae
commit 1c4c3f06fa
10 changed files with 94 additions and 59 deletions

View File

@ -461,7 +461,7 @@ void cmd_move_con_to_workspace(I3_CMD, char *which) {
TAILQ_FOREACH(current, &owindows, owindows) {
DLOG("matching: %p / %s\n", current->con, current->con->name);
con_move_to_workspace(current->con, ws, true, false);
con_move_to_workspace(current->con, ws, true, false, false);
}
cmd_output->needs_tree_render = true;
@ -488,7 +488,7 @@ void cmd_move_con_to_workspace_back_and_forth(I3_CMD) {
TAILQ_FOREACH(current, &owindows, owindows) {
DLOG("matching: %p / %s\n", current->con, current->con->name);
con_move_to_workspace(current->con, ws, true, false);
con_move_to_workspace(current->con, ws, true, false, false);
}
cmd_output->needs_tree_render = true;
@ -532,7 +532,7 @@ void cmd_move_con_to_workspace_name(I3_CMD, char *name) {
TAILQ_FOREACH(current, &owindows, owindows) {
DLOG("matching: %p / %s\n", current->con, current->con->name);
con_move_to_workspace(current->con, ws, true, false);
con_move_to_workspace(current->con, ws, true, false, false);
}
cmd_output->needs_tree_render = true;
@ -583,7 +583,7 @@ void cmd_move_con_to_workspace_number(I3_CMD, char *which) {
TAILQ_FOREACH(current, &owindows, owindows) {
DLOG("matching: %p / %s\n", current->con, current->con->name);
con_move_to_workspace(current->con, workspace, true, false);
con_move_to_workspace(current->con, workspace, true, false, false);
}
cmd_output->needs_tree_render = true;
@ -1223,7 +1223,7 @@ void cmd_move_con_to_output(I3_CMD, char *name) {
TAILQ_FOREACH(current, &owindows, owindows) {
DLOG("matching: %p / %s\n", current->con, current->con->name);
con_move_to_workspace(current->con, ws, true, false);
con_move_to_workspace(current->con, ws, true, false, false);
}
cmd_output->needs_tree_render = true;
@ -1597,6 +1597,11 @@ void cmd_sticky(I3_CMD, char *action) {
ewmh_update_sticky(current->con->window->id, sticky);
}
/* A window we made sticky might not be on a visible workspace right now, so we need to make
* sure it gets pushed to the front now. */
output_push_sticky_windows();
cmd_output->needs_tree_render = true;
ysuccess(true);
}