summaryrefslogtreecommitdiff
path: root/workspace.lua
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-06-12 09:02:09 +0200
committerAnton Khirnov <anton@khirnov.net>2021-06-12 09:02:09 +0200
commit82ed6ed9242675313e1835b18356b2b1e91fb4b0 (patch)
tree1f958313e52974d02524034d86d121d13e307c97 /workspace.lua
parentd2779c6613a500654fb27fa47f53a3bb96b220c1 (diff)
workspace: pass the desktop to desktop:view signal
Not its index. This is more convenient to use.
Diffstat (limited to 'workspace.lua')
-rw-r--r--workspace.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/workspace.lua b/workspace.lua
index 1522d68..63fad94 100644
--- a/workspace.lua
+++ b/workspace.lua
@@ -113,10 +113,11 @@ function Workspace:view(screen, desktop_idx, page_idx)
self.screen_state[screen_other] = state_cur
desktop.screen_map[page_idx] = screen
- self.signals:emit_signal("desktop:view", screen, desktop_idx)
+ self.signals:emit_signal("desktop:view", screen, desktop)
if state_cur then
self.desktops[state_cur.desktop_idx].screen_map[state_cur.page_idx] = screen_other
- self.signals:emit_signal("desktop:view", screen_other, state_cur.desktop_idx)
+ self.signals:emit_signal("desktop:view", screen_other,
+ self.desktops[state_cur.desktop_idx])
end
else
-- mark previous page as free
@@ -131,7 +132,7 @@ function Workspace:view(screen, desktop_idx, page_idx)
desktop.screen_map[page_idx] = screen
self.screen_state[screen] = { page_idx = page_idx, desktop_idx = desktop_idx }
- self.signals:emit_signal("desktop:view", screen, desktop_idx)
+ self.signals:emit_signal("desktop:view", screen, desktop)
end
self:_apply_state()