From ad9ffe43945c708b20626ac487eec219eb25e301 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 2 Dec 2020 14:25:55 +0100 Subject: workspace: use delayed_call() for preserving focus after page switch --- workspace.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'workspace.lua') diff --git a/workspace.lua b/workspace.lua index 71bfaa7..f6ac79d 100644 --- a/workspace.lua +++ b/workspace.lua @@ -3,6 +3,7 @@ local M = {} local awful = require("awful") local object = require("gears.object") local stack = require("stack") +local timer = require("gears.timer") local Workspace = {} @@ -58,7 +59,7 @@ function Workspace:_apply_state() end end - awful.screen.focus(orig_focus) + timer.delayed_call(awful.screen.focus, orig_focus) end function Workspace:view(screen, desktop_idx, page_idx) -- cgit v1.2.3