recheckWorkArea() even when not active to prevent CReservedArea assert failure#13590
Open
logannc wants to merge 1 commit intohyprwm:mainfrom
Open
recheckWorkArea() even when not active to prevent CReservedArea assert failure#13590logannc wants to merge 1 commit intohyprwm:mainfrom
logannc wants to merge 1 commit intohyprwm:mainfrom
Conversation
|
Hello and thank you for making a PR to Hyprland! Please check the PR Guidelines and make sure your PR follows them. If your code can be tested, please always add tests. See more here. beep boop, I'm just a bot. A real human will review your PR soon. |
vaxerski
reviewed
Mar 5, 2026
Member
vaxerski
left a comment
There was a problem hiding this comment.
probably should be added to swap too?
Author
Looks like it should be fine as it calls |
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.
Describe your PR, what does it fix/add?
This fixes a crash under a fairly niche but core use case involving multiple monitors. Ultimately it leads to violating the assertion in CReservedArea.
Steps to reproduce the crash
exec-once = [workspace 33 silent] uwsm app -- signal-desktopin my casehyprctl dispatch focusworkspaceoncurrentmonitor 33.It should crash due to the workspace work area being stale due to
recheckWorkArea()not being called in this path, with the old stale work area reflecting the original monitor, which is not contained within the coordinates on the new monitor.Note: this doesn't crash when active due to
recalculateMonitor()inside theSWITCHINGISACTIVEbranch ~L2017.Note: this doesn't crash when the workspace has had a focused window due to skipping
getTopLeftWindow()andgetWindowIdealBoundingBoxIgnoreReserved()whenpWindowis non-null. (or I guess when there is a fullscreen window).This was discovered using a plugin called hyprsplit (currently running off my own branch), but per above is reproducible on hyprland without the plugin.
Is it ready for merging, or does it need work?
I'm not 100% sure. I'm not 100% sure how to test this. I have read the dev setup but I'm not sure how to test multiple monitors in the dev setup (and the easiest way to reproduce involves violating the suggestions of "don't use exec-once") nor how to run my branch on an actual login session on my computer.
If this PR is not correct, I'm happy to convert it to a bugreport for someone more familiar with the codebase to take on.
I'm also not incredibly familiar with the standard hyprland lifecycle patterns, so perhaps
recheckWorkArea()or a similar function should be hoisted to a calling function or something.