Skip to content

fix(notifications): show toast/OSD on focused output with correct scaling#730

Draft
MalpenZibo wants to merge 1 commit intomainfrom
feat/toast-osd-focused-output-scaling
Draft

fix(notifications): show toast/OSD on focused output with correct scaling#730
MalpenZibo wants to merge 1 commit intomainfrom
feat/toast-osd-focused-output-scaling

Conversation

@MalpenZibo
Copy link
Copy Markdown
Owner

@MalpenZibo MalpenZibo commented May 6, 2026

Summary

Toast and OSD overlays were created with one layer surface per output and output: None, which made the compositor place them all on the same monitor and forced iced_layershell to fall back to an arbitrary output's scale — producing wrong-size renders on multi-monitor setups with mixed HiDPI / non-HiDPI displays.

This PR switches to a single overlay surface per kind, still with output: None so the compositor maps it on the focused output, and uses the new OutputEvent::SurfaceEnteredOutput event from iced_layershell to learn which output ended up being chosen. That output is then used to look up the correct logical height for bottom-anchored toast input regions.

A small OverlaySurface helper centralizes show / hide / output-tracking so toast and OSD don't duplicate the logic.

…aling

Toast and OSD overlays were created with one layer surface per output
and `output: None`, which made the compositor place them all on the
same monitor and forced iced_layershell to fall back to an arbitrary
output's scale — producing wrong-size renders on multi-monitor setups
with mixed HiDPI/non-HiDPI displays.

Switch to a single overlay surface per kind, still with `output: None`
so the compositor maps it on the focused output, and rely on the new
`OutputEvent::SurfaceEnteredOutput` event from iced_layershell to learn
which output ended up being chosen. That output is then used to look up
the correct logical height for bottom-anchored toast input regions.

Also extract a small `OverlaySurface` helper so toast and OSD share the
show / hide / output-tracking code instead of duplicating it.

Requires iced_layershell branch `feat/surface-output-tracking`
(MalpenZibo/iced_layershell#20) until that lands and a new tag is cut.
@MalpenZibo MalpenZibo changed the title feat(notifications): show toast/OSD on focused output with correct scaling fix(notifications): show toast/OSD on focused output with correct scaling May 6, 2026
@github-actions github-actions Bot added the bug Something isn't working label May 6, 2026
@MalpenZibo MalpenZibo removed the feature label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant