Skip to content

Conversation

@bolphen
Copy link
Contributor

@bolphen bolphen commented Mar 14, 2025

A few fixes for the Wayland backend.

  • The error handling is kinda important; without it, the compositor can decide to close the window with Miniquad busy looping in the background and consuming 100% CPU usage, which would be very bad for a clueless end user.
  • Handle dpi scale change in runtime. This is where I ran into the error handling issue: if you have a window with size say 801x600, changing dpi to 2x would end up with a protocol error saying that 801 is not a multiple of 2. There's still some issue with the current implementation, as after a dpi scale change the first few frames would not be rendered correctly. But at least it's not crashing, and I think changing dpi really doesn't happen that frequently so no more Wayland's "every frame is perfect" 🤷

@not-fl3
Copy link
Owner

not-fl3 commented Mar 14, 2025

Thanks!!

@not-fl3 not-fl3 merged commit 5c74b77 into not-fl3:master Mar 14, 2025
11 checks passed
@bolphen bolphen deleted the wayland-fixes branch March 14, 2025 19:08
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.

2 participants