summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-12-02 14:25:55 +0100
committerAnton Khirnov <anton@khirnov.net>2020-12-02 14:25:55 +0100
commitad9ffe43945c708b20626ac487eec219eb25e301 (patch)
tree1c8c55524bb062ac0a89f233495485d750f44f01
parent43cc28333261be2eafc44c6fc984ad46299bad4b (diff)
workspace: use delayed_call() for preserving focus after page switch
-rw-r--r--workspace.lua3
1 files changed, 2 insertions, 1 deletions
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)