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
Give me window resizes or give me death #26
Give me window resizes or give me death #26
Conversation
Oh also weeeeeeeeweeee.mp4 |
Unfortunately this doesn't work in its current state on macOS since theres no other events to process after a window resize. The result is that the window stays unrefreshed and resized until you do another winit action like click the window. I've also experimented with a seperate rendering thread to help this issue but the one thing that always got me was resizing! The thing is that theres never going to be a |
Bleh, looks like we're running into platform specific differences since it appears that
When dragging the window to shrink it will pick up on cursor movements on the window. When expanding it will just be I've just pushed changes to trigger the resize off of a |
Mmm it does work however I don't see any difference in what its doing then before. I thought that |
I had an issue with endlessly looping redraws before, but i just realized that i was requesting a redraw on every redraw event 🤦♂️ I'll switch things around to simplify them after i wake up |
Actually I think main events cleared is still the ideal place to handle this since it doesn't involve having to special case any future window/user/device events that we may handle Can you clarify what you mean by "before"? |
I think all the issues with this PR are resolved at this point |
With my previous comment I meant to say that on macOS it showed that resizes were being triggered immediately after pending_resize was set. So
but after looking closer I've seen a few
so this PR is working 🎊. The only thing I'm unsure about is whether we still need |
Yeah |
Oh one last thing (sorry to be a pain) but there needs to be a |
Nice catch on that! Should be all good now 🤞 |
Looks good 👍 |
Resolves #25
The comment linked below covers things pretty well. The gist is that we can lazily handle window resizing since we will get a
RedrawRequested
afterwards. This prevents a bunch ofWindowResized
s from clogging up the event queuehttps://github.com/trimental/inlyne/compare/main...LovecraftianHorror:give-me-window-resizes-or-give-me-death?expand=1#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fcR191-R216