Fixed a crash when the window is resized#8
Open
teschnei wants to merge 1 commit intovalarnin:masterfrom
Open
Conversation
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.
Repro: run in a tiling window manager? probably other ways to repro
Root cause: DrawArea initialised with config file dimensions, parameters copied to RenderHandler, DrawArea is updated afterwards in SetSize (by window manager?), but the new dimensions aren't known by RenderHandler because they were copied earlier. So just changing RenderHandler to have a pointer to DrawArea instead of a copy should make it know resizes. I didn't see any code paths where the DrawArea (or its parent structs) get recreated, so it shouldn't have any lifetime issues.
If you think there's a better way to fix it, just leave me a comment, I'll change it to whatever you like.
Not extensively tested yet, I have other work on this to get it to work in wayland/wlroots still.