From b48ff2c5ec563ae88fe977cb0618779916fcefd2 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Tue, 15 Oct 2019 18:40:59 +0300 Subject: [PATCH] Do not show scratchpad windows after 'move to position' Fixes #3832 --- src/floating.c | 5 +++++ testcases/t/185-scratchpad.t | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/floating.c b/src/floating.c index 719cc194..d2b3a6ed 100644 --- a/src/floating.c +++ b/src/floating.c @@ -492,6 +492,11 @@ void floating_raise_con(Con *con) { * */ bool floating_maybe_reassign_ws(Con *con) { + if (con_is_internal(con_get_workspace(con))) { + DLOG("Con in an internal workspace\n"); + return false; + } + Output *output = get_output_from_rect(con->rect); if (!output) { diff --git a/testcases/t/185-scratchpad.t b/testcases/t/185-scratchpad.t index fd3827f7..bffdf74a 100644 --- a/testcases/t/185-scratchpad.t +++ b/testcases/t/185-scratchpad.t @@ -532,5 +532,21 @@ is(scalar @{get_ws_content($ws)}, 0, 'no window in workspace'); cmd 'scratchpad show'; is($x->input_focus, $window->id, 'scratchpad window shown'); +################################################################################ +# 19: move position commands do not show scratchpad window +# See issue #3832 +################################################################################ + +kill_all_windows; + +fresh_workspace; +$first = open_window; +$second = open_window; + +cmd '[id=' . $first->id . '] move to scratchpad, move position 100 100'; +is ($x->input_focus, $second->id, 'moving scratchpad window does not show it'); +cmd '[id=' . $first->id . '] move position center'; +is ($x->input_focus, $second->id, 'centering scratchpad window does not show it'); + done_testing;