winit-sonoma-fix/examples
Robert Bragg e5eb253698 window_ondemand: wait for Destroyed event before exiting app
Considering the strict requirement that applications can't keep windows
across run_ondemand calls, this tries to make the window_ondemand example
explicitly wait for its Window to be destroyed before exiting each
run_ondemand iteration.

This updates the example to only `.set_exit()` after it gets a
`Destroyed` event after the Window has been dropped.

On Windows this works to ensure the Window is destroyed before the
example waits for 5 seconds.

Unfortunately though:
1. The Wayland backend doesn't emit `Destroyed` events for windows
2. The macOS backend emits `Destroyed` events before the window is
   really destroyed.

and so the example isn't currently portable.
2023-07-28 03:04:32 +04:00
..
util Disallow cleanup for TLS in examples 2023-06-26 01:04:38 +04:00
child_window.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
control_flow.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
cursor.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
cursor_grab.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
custom_events.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
drag_window.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
fullscreen.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
handling_close.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
icon.png Window icons (#497) 2018-05-07 17:36:21 -04:00
ime.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
key_binding.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
monitor_list.rs Properly print outputs in monitor_list example 2023-01-30 14:17:41 +03:00
mouse_wheel.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
multithreaded.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
multiwindow.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
request_redraw.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
request_redraw_threaded.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
resizable.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
startup_notification.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
theme.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
timer.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
touchpad_gestures.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
transparent.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
video_modes.rs Fix clippy issues on stable 2023-01-27 07:18:58 +03:00
web.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
web_aspect_ratio.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_buttons.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_debug.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_drag_resize.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_icon.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_ondemand.rs window_ondemand: wait for Destroyed event before exiting app 2023-07-28 03:04:32 +04:00
window_option_as_alt.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_pump_events.rs Add examples/window_pump_events 2023-07-28 03:04:32 +04:00
window_resize_increments.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00
window_tabbing.rs Re-work event loop run() API so it can return a Result 2023-07-28 03:04:32 +04:00