Sway ipc fixes: wrong workspace highlighted with waybar #275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw that #255 was closed, but I still experience this issue.
In case it matters, I experienced it while launching miraclewm with
WAYLAND_DISPLAY=wayland-98 miracle-wm
This PR fixes it.
AFAICT there were essentially 3 problems:
old
property onIPC_EVENT_WORKSPACE
event with typefocus
was wrongset_is_active
was not called onoutput
after it was set tostate.active_output
focused
was true for containers on not visible workspaces and false for all workspaces becauseroot->is_focused()
is always falseFeel free to not prioritize review/merge or to close this PR according to your current workload.