Repository navigation
A layer that changes monitor is not kept alive as the popups' parent (#136) - #138
Merged
Merged
Conversation
…4ditano#136) The first layer configured became the popups' parent ("while the mouse hasn't been seen on any, popups hang from the first one"), and that clone was only replaced when the pointer entered another surface. When `screens:` from a text moved the surface to another monitor, the old layer was dropped everywhere else but stayed alive through that clone: still mapped, frozen on its last frame, on the monitor it left. A launcher driven by a controller (the pointer hidden) kept it there until it was closed. Now a layer that goes (rescreen, a monitor unplugged, surface_gone) stops being the parent; the next one configured takes its place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, merged. A layer that leaves should never stay the popups' parent, and the fix is right where it belongs. I checked that a missing parent only skips a popup until the next layer configured takes the place, and ran the two-monitor move bench on it: same moves, the scene kept its state. It's out in 0.7.23. |
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.
Fixes the second problem in #136: after
screens:from a text moves a surface to another monitor, its first layer can stay on the monitor it left. It stays mapped, frozen on its last frame, and does not take input. It looks as if the scene is on both monitors at once.Cause
configured()stores a clone of the first configured layer as the popups' parent ("while the mouse hasn't been seen on any, popups hang from the first one"). That clone is only replaced when the pointer enters another surface.rescreendrops the layer everywhere else, but this clone keeps it alive. In a launcher driven by a controller, with the pointer hidden, it stayed there until the scene was closed.Change
forget_parent(wl): when a layer goes (rescreen,remove_from,surface_gone), it stops being the popups' parent. The next layer configured takes that place, as at start.Tested
Hyprland 0.57, three 1920×1080 monitors. Layers of the scene's pid from
hyprctl layers -j, sampled every 20 ms:DP-1/20cf0beside each new one)screens: on_screen: 22 moves between two monitors (16 at 150 ms), 0 of 315 samples with two layers. Then tried by hand switching fast with the controller, and it no longer happens.cargo test --release: 193 passed, 2 ignored.🤖 Generated with Claude Code