fix(notifications): show toast/OSD on focused output with correct scaling#730
Draft
MalpenZibo wants to merge 1 commit intomainfrom
Draft
fix(notifications): show toast/OSD on focused output with correct scaling#730MalpenZibo wants to merge 1 commit intomainfrom
MalpenZibo wants to merge 1 commit intomainfrom
Conversation
…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.
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.
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 forcediced_layershellto 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: Noneso the compositor maps it on the focused output, and uses the newOutputEvent::SurfaceEnteredOutputevent 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
OverlaySurfacehelper centralizes show / hide / output-tracking so toast and OSD don't duplicate the logic.