diff --git a/mouse.lua b/mouse.lua index d1390f2..65a2455 100644 --- a/mouse.lua +++ b/mouse.lua @@ -82,7 +82,9 @@ function module.highlight() end function module.hide() - w.visible = false + if w then + w.visible = false + end end -return module \ No newline at end of file +return module diff --git a/screen.lua b/screen.lua index 6ed5f84..415cc8c 100644 --- a/screen.lua +++ b/screen.lua @@ -89,7 +89,7 @@ end local function select_screen(scr_index,move,old_screen) if scr_index ~= old_screen then local c = last_clients[scr_index] - if not pcall(c) then + if pcall(c) then last_clients[scr_index] = nil c = nil end @@ -238,4 +238,4 @@ capi.client.connect_signal("focus",function(c) end) return module --- kate: space-indent on; indent-width 2; replace-tabs on; \ No newline at end of file +-- kate: space-indent on; indent-width 2; replace-tabs on;