Merge branch 'fix-fullscreen-scratch'

This commit is contained in:
Michael Stapelberg 2012-09-16 17:59:43 +02:00
commit 4df409bae6
1 changed files with 10 additions and 0 deletions

View File

@ -76,6 +76,16 @@ void scratchpad_show(Con *con) {
Con *__i3_scratch = workspace_get("__i3_scratch", NULL);
Con *floating;
/* If the current con or any of its parents are in fullscreen mode, we
* first need to disable it before showing the scratchpad con. */
Con *fs = focused;
while (fs && fs->fullscreen_mode == CF_NONE)
fs = fs->parent;
if (fs->type != CT_WORKSPACE) {
con_toggle_fullscreen(focused, CF_OUTPUT);
}
/* If this was 'scratchpad show' without criteria, we check if the
* currently focused window is a scratchpad window and should be hidden
* again. */