Commit graph

14 commits

Author SHA1 Message Date
Jonathan Johnson
331bfdd353
App::prevent_shutdown() 2024-09-12 07:37:14 -07:00
Jonathan Johnson
4cab6aedd1
Refactored app init 2024-09-06 11:31:23 -07:00
Jonathan Johnson
516401f48c
Exposing event loop details 2024-09-06 10:41:14 -07:00
Jonathan Johnson
ea1c0975dc
Fixing multiwindow close behavior 2024-08-28 08:42:39 -07:00
Jonathan Johnson
ee4528cab2
Attempt to make resizes repaint in time
This introduces a RedrawGuard concept, which allows the event loop to
block until the window has been repainted. This hopefully will resolve
khonsulabs/cushy#114.
2024-05-12 06:30:59 -07:00
Jonathan Johnson
6048148efd
winit 0.30 2024-05-01 11:29:26 -07:00
Jonathan Johnson
1ff4b7b2a6
Window no longer keeps msg channel allocated 2023-12-22 08:24:12 -08:00
Jonathan Johnson
125e9f7c46
Updating winit
Discovered the rwh feature flags
2023-11-20 06:20:20 -08:00
Jonathan Johnson
b0c73429f5
Updated inner size handling 2023-09-02 09:11:48 -07:00
Roland Fredenhagen
e7d01c02bb
winit 0.29 2023-09-02 15:31:43 +02:00
Jonathan Johnson
1b5da400f3
Added ability to send messages to windows.
Gooey is using this to send invalidation messages from the UI callbacks.
2023-07-15 08:12:42 -07:00
Jonathan Johnson
13e0864bcd
Added ability for windows to call the main loop
When I ran the new Kludgine on my mac last night, I was surprised to
discover it didn't work. It turns out create_surface needs to be called
on the main thread on Metal.

This commit adds a way to provide a callback that can be remotely called
through the EventLoopProxy. This allows Kludgine to send a
CreateSurfaceRequest to the main event loop and receive a wgpu::Surface
back.
2023-07-04 07:42:33 -07:00
Jonathan Johnson
8f49442f28
Window panics are now handled
Prior to this commit, if a window panic happened, the window would be
left on the screen frozen. Now, the panic is caught and the window is
closed before resuming the panic.

The app event loop has a separate message it receives when a window
panics, and if it's the last window, the process exits with a non-zero
exit code.

This places the burden of handling a panicking window into the
developer's hands: ultimately if the window has a way to communicate
with it, the behavior is being dropped as part of the panic handling,
which ensures any channels the window had will be dropped too.
2023-07-03 08:38:38 -07:00
Jonathan Johnson
3f099070c2
Initial commit. 2023-06-27 09:21:38 -07:00