In switcher mode, always set focus to the top window after changing the area. This fixes issue #14.

This commit is contained in:
Xinhao Yuan 2021-07-14 20:53:31 -04:00
parent 7f5b0b17a5
commit 5cee31af77
1 changed files with 66 additions and 68 deletions

View File

@ -411,8 +411,7 @@ function module.start(c, exit_keys)
tablist = nil
set_selected_area(choice)
if c then
if ctrl and cd[c].draft ~= false then
if c and ctrl and cd[c].draft ~= false then
local lu = cd[c].lu or cd[c].area
local rd = cd[c].rd or cd[c].area
@ -455,7 +454,7 @@ function module.start(c, exit_keys)
c:emit_signal("request::activate", "mouse.move", {raise=false})
c:raise()
awful.layout.arrange(screen)
elseif shift then
elseif c and shift then
-- move the window
local in_draft = cd[c].draft
if cd[c].draft ~= nil then
@ -482,7 +481,6 @@ function module.start(c, exit_keys)
awful.layout.arrange(screen)
tablist = nil
end
else
maintain_tablist()
-- move the focus