diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-06-12 09:02:09 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-06-12 09:02:09 +0200 |
commit | 82ed6ed9242675313e1835b18356b2b1e91fb4b0 (patch) | |
tree | 1f958313e52974d02524034d86d121d13e307c97 /workspace.lua | |
parent | d2779c6613a500654fb27fa47f53a3bb96b220c1 (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.lua | 7 |
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() |