From f5ad91619df0a398fad00e01e30c0fbd278f963f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 2 Dec 2020 16:09:47 +0100 Subject: 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. --- workspace.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'workspace.lua') 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 -- cgit v1.2.3