Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix resize frame #284

Conversation

TheDrawingCoder-Gamer
Copy link
Contributor

Resizing doesn't correctly request a new frame. This changes the code so it goes through the platform specific way of requesting a new frame, instead of just accepting a frame event. Fixes resizing oddities in X11 (and wayland when the patch is applied to my branch).

@tonsky
Copy link
Collaborator

tonsky commented Jan 10, 2024

There’s Platform.CURRENT != Platform.X11, how can it possibly fix oddities in X11?

@TheDrawingCoder-Gamer
Copy link
Contributor Author

TheDrawingCoder-Gamer commented Jan 10, 2024

I was mistaken. Works for Wayland at least, fixes oddities there. Before this change, my wayland branch with HumbleUI didn't update the buffer size until I did something that would trigger a repaint anyway, like hovering over a button. Now it resizes it correctly.

Note for X11: The reason I've made this change is that sometimes, before the change, the surface I got was a null pointer. After this change it's no longer null, but it still is sometimes null on X11. I haven't observed this in actual HumbleUI but I've been observing this in my own toolkit.

@tonsky
Copy link
Collaborator

tonsky commented Jan 10, 2024

How does it help though? Is there some extra work that’s been done in requestFrame? Because you are supposed to reset surfaces in EventFrame hanlder, right? And it shouldn’t matter if it was called from resize event or frame event? It’s called either way?

@TheDrawingCoder-Gamer
Copy link
Contributor Author

I can't observe the changes anymore. Probably a quirk of my system; closing

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

Successfully merging this pull request may close these issues.

None yet

2 participants