Skip to content

Fixed a crash when the window is resized#8

Open
teschnei wants to merge 1 commit intovalarnin:masterfrom
teschnei:resize_crash
Open

Fixed a crash when the window is resized#8
teschnei wants to merge 1 commit intovalarnin:masterfrom
teschnei:resize_crash

Conversation

@teschnei
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant