Bugfix: Don’t focus the wrong workspace when moving to scratchpad (+test) (Thanks loblik)

The problem was that scratchpad_move() didn’t check whether the source
workspace was focused. Therefore, 'move scratchpad' only worked reliably
interactively , but not when used with criteria.
This commit is contained in:
Michael Stapelberg
2012-09-14 13:03:39 +02:00
parent 9436e6f26e
commit 15499bf8e7
3 changed files with 24 additions and 2 deletions

View File

@ -58,7 +58,8 @@ void scratchpad_move(Con *con) {
/* 4: Fix focus. Normally, when moving a window to a different output, the
* destination output gets focused. In this case, we dont want that. */
con_focus(focus_next);
if (con_get_workspace(focus_next) == con_get_workspace(focused))
con_focus(focus_next);
}
/*