X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fscratchpad.c;h=17df77dde624804e642a0934c9157a06bef07e18;hb=9ee26a608e329ceea583950fcc92bc5a28f6cf55;hp=d6c1a09e1d630e92eec364c125c9e4e2389a485e;hpb=8677936f6ccab4f733580d72926a06a8e1f081a2;p=i3%2Fi3 diff --git a/src/scratchpad.c b/src/scratchpad.c index d6c1a09e..17df77dd 100644 --- a/src/scratchpad.c +++ b/src/scratchpad.c @@ -66,7 +66,13 @@ void scratchpad_move(Con *con) { * adjusted in size according to what the user specifies. */ if (con->scratchpad_state == SCRATCHPAD_NONE) { DLOG("This window was never used as a scratchpad before.\n"); - con->scratchpad_state = SCRATCHPAD_FRESH; + if (con == maybe_floating_con) { + DLOG("It was in floating mode before, set scratchpad state to changed.\n"); + con->scratchpad_state = SCRATCHPAD_CHANGED; + } else { + DLOG("It was in tiling mode before, set scratchpad state to fresh.\n"); + con->scratchpad_state = SCRATCHPAD_FRESH; + } } } @@ -175,6 +181,10 @@ void scratchpad_show(Con *con) { LOG("Use 'move scratchpad' to move a window to the scratchpad.\n"); return; } + } else { + /* We used a criterion, so we need to do what follows (moving, + * resizing) on the floating parent. */ + con = con_inside_floating(con); } /* 1: Move the window from __i3_scratch to the current workspace. */