From bbe86e4e256d20c7aa94a28f7fdc838d5a0abd4e Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 16 Mar 2014 21:53:58 +0100 Subject: [PATCH] awful.client.movetoscreen: Don't untag clients completely (FS#1196) If a client gets moved to a screen without any selected tags, that client disappears and it is non-trivial to get it back. Since this is unexpected and annoying, make movetoscreen do nothing if the target screen has no tags selected. Signed-off-by: Uli Schlachter --- lib/awful/client.lua.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index 4a92acecc..8addc691e 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -502,8 +502,10 @@ function client.movetoscreen(c, s) s = sel.screen + 1 end if s > sc then s = 1 elseif s < 1 then s = sc end - sel.screen = s - screen.focus(s) + if #tag.selectedlist(s) > 0 then + sel.screen = s + screen.focus(s) + end end end