input/seat: check only the last output workspace on focus#9140
Open
kupospelov wants to merge 1 commit into
Open
input/seat: check only the last output workspace on focus#9140kupospelov wants to merge 1 commit into
kupospelov wants to merge 1 commit into
Conversation
`seat_set_workspace_focus()` contains two references to the "last workspace": - `last_workspace` is the last focused workspace on all outputs. - `new_output_last_ws` is the last focused workspace on the new workspace output. They are the same when using a single output, but with multiple outputs they can diverge: `last_workspace` will be the focused workspace on the previous output, `new_output_last_ws` will be the previously focused workspace on the current output. This confusion seems to have led to swaywm#9139 when `last_workspace` was used instead of `new_output_last_ws`. However, we can safely drop `last_workspace` and use `new_output_last_ws` for everything that `seat_set_workspace_focus()` does: - Calling `node_set_dirty()` on the new output. - Calling `wlr_ext_workspace_handle_v1_set_active()` on the last workspace (this fixes swaywm#9139). - Skip `workspace_consider_destroy()` on `last_workspace`, since the other output still has it focused. This commit also renames `new_output_last_ws` to `last_workspace` to keep the name simple.
Contributor
Author
|
@WhyNotHugo @emersion PTAL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
seat_set_workspace_focus()contains two references to the "last workspace":last_workspaceis the last focused workspace on all outputs.new_output_last_wsis the last focused workspace on the new workspace output.They are the same when using a single output, but with multiple outputs they can diverge:
last_workspacewill be the focused workspace on the previous output,new_output_last_wswill be the previously focused workspace on the current output.This confusion seems to have led to #9139 when
last_workspacewas used instead ofnew_output_last_ws.However, we can safely drop
last_workspaceand usenew_output_last_wsfor everything thatseat_set_workspace_focus()does:node_set_dirty()on the new output.wlr_ext_workspace_handle_v1_set_active()on the last workspace (this fixes ext-workspace-v1: sway does not deactivate workspace when focusing a workspace assigned to another output #9139).workspace_consider_destroy()onlast_workspace, since the other output still has it focused.This commit also renames
new_output_last_wstolast_workspaceto keep the name simple.