summaryrefslogtreecommitdiff
path: root/workspace.lua
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-12-02 16:09:47 +0100
committerAnton Khirnov <anton@khirnov.net>2020-12-02 16:09:47 +0100
commitf5ad91619df0a398fad00e01e30c0fbd278f963f (patch)
tree41d52f28edd7505540d3035332532057fbb53f40 /workspace.lua
parentc5282fe57820960f48a3e28f98609a848a972dfb (diff)
pager: improve marking visible pages
Use a new desktop signal - page:hide - to make updates work correctly in all cases. Mark pages of the same desktop displayed on other screens with a special color.
Diffstat (limited to 'workspace.lua')
-rw-r--r--workspace.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/workspace.lua b/workspace.lua
index 2ba67e5..f0a6dcc 100644
--- a/workspace.lua
+++ b/workspace.lua
@@ -117,8 +117,12 @@ function Workspace:view(screen, desktop_idx, page_idx)
else
-- mark previous page as free
if state_cur then
- self.desktops[state_cur.desktop_idx].screen_map[state_cur.page_idx] = nil
- self.desktops[state_cur.desktop_idx].indices_free:push(state_cur.page_idx)
+ local desk = self.desktops[state_cur.desktop_idx]
+
+ desk.screen_map[state_cur.page_idx] = nil
+ desk.indices_free:push(state_cur.page_idx)
+
+ desk:emit_signal("page:hide", state_cur.page_idx)
end
desktop.screen_map[page_idx] = screen