Skip to content

i3/ipc: update monitors and focus when a workspace is moved - #1577

Open
gregdel wants to merge 1 commit into
quickshell-mirror:masterfrom
gregdel:sway-workspace-move
Open

gregdel wants to merge 1 commit into
quickshell-mirror:masterfrom
gregdel:sway-workspace-move

Conversation

@gregdel

@gregdel gregdel commented Dec 1, 2026

Copy link
Copy Markdown

Describe your changes

This patch moves focus to the newly focused monitor and refreshes all monitors to show the relevant / updated state of the shell.

Details and descisions

While using sway with the move workspace to output right command, my quickshell bars' state are not updated. The focus is on the wrong monitor. This could be fixed by handling raw events in the shell config, or upstream in this PR.

AI Assisted notes for the debug session:

  • When moving the focused workspace, Sway only sends a move event, no focus event.
  • Before this patch, only the workspace's output was updated, so the monitors' active workspaces and the focused monitor stayed stale.
  • The refresh is needed because the event doesn't say which workspace the old output now shows.
  • The refresh alone can't fix focus, so focus is moved to the new monitor when the moved workspace was focused.
  • Tested on Sway, not on i3.

Open concerns

I've not tested this change under i3.

Participation

Thanks for this awesome project, I'm of course ready for the classic review process.

Move events only update the moved workspace, leaving monitor active
workspaces stale. When the focused workspace moves, no focus event
follows, so focus must be moved to its new monitor directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant