Skip to content

Sway Workspace: Fix workspace button not showing for tabbed/nested layouts #4046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

ebeem
Copy link
Contributor

@ebeem ebeem commented Apr 12, 2025

This PR improves the logic used to detect the currently focused workspace in Sway by fixing an issue that occurred when the layout was set to tabbed (or any other nested layout).

Previously, the code only checked one level deep for a focused container, this failed to detect focus correctly when the focused view was nested deeper within tabbed or stacked containers, causing waybar to show incorrect or missing workspace names.

We now recursively traverse all child nodes (including nodes and floating_nodes) to check for a focused container, ensuring proper detection regardless of layout depth

@Alexays Alexays merged commit 0332d2e into Alexays:master Apr 24, 2025
8 of 9 checks passed
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.

2 participants