Fix freeze when resizing a window (#239)

Fixed an annoying bug where the application would freeze when resizing
the window
This pull request made it so the SDL window's resizing event now
broadcasts a new event specifically asking the swapchain to recreate
itself, which will in turn broadcast the original event when done. It
also removed the Event enum specific values, as they were irrelevant.
This commit is contained in:
Daemo
2026-08-07 00:18:52 +02:00
committed by GitHub
parent ddfbe32cea
commit 2d0c02ae7e
3 changed files with 9 additions and 8 deletions
+4 -3
View File
@@ -19,9 +19,10 @@ namespace mlx
enum class Event
{
ResizeEventCode = 56,
FrameBeginEventCode = 57,
FatalErrorEventCode = 168,
ResizeEventCode = 1,
SwapchainResizeEventCode,
FrameBeginEventCode,
FatalErrorEventCode,
EndEnum
};