Skip to content

fix: sync foreign toplevel visibility with tags#951

Open
EzequielColungaAcha wants to merge 1 commit into
mangowm:mainfrom
EzequielColungaAcha:fix-foreign-toplevel-tag-visibility
Open

fix: sync foreign toplevel visibility with tags#951
EzequielColungaAcha wants to merge 1 commit into
mangowm:mainfrom
EzequielColungaAcha:fix-foreign-toplevel-tag-visibility

Conversation

@EzequielColungaAcha
Copy link
Copy Markdown

Summary

  • Advertise foreign toplevels to outputs only when their tags are visible on the selected tag set.
  • Keep minimized clients advertised on their restore tag so taskbars can still restore them.
  • Use foreign-toplevel output enter/leave events so taskbars like Waybar do not need compositor-specific IPC.

Test plan

  • Built locally through the Arch package workflow.
  • Verified the PR diff is limited to src/mango.c and src/ext-protocol/foreign-toplevel.h.

Made with Cursor

Waybar's wlr/taskbar relies on foreign-toplevel output enter/leave events to decide which windows belong on a bar. Mango previously announced every client on its monitor even when the client's tags were not visible, so taskbars showed windows from other tags.

Track whether each foreign toplevel has been announced to its output and resync that state when tag visibility, monitor assignment, minimization, or restoration changes. Minimized clients use their restore tag so they can stay visible in the taskbar for the tag they belong to and be restored from the taskbar.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EzequielColungaAcha
Copy link
Copy Markdown
Author

Basically, used with wlr/taskbar it shows the windows open on the current tag only, making the click to minimize/maximize work as in DWM.

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