Registering xdg before starting winit

This commit is contained in:
Jonathan Johnson 2024-09-21 13:45:16 -07:00
parent 95fc2c6744
commit 6869fcf3be
No known key found for this signature in database
GPG key ID: A66D6A34D6620579

View file

@ -229,6 +229,10 @@ where
on_startup,
pending_windows,
} = self;
#[cfg(all(target_os = "linux", feature = "xdg"))]
xdg::observe_darkmode_changes(event_loop.create_proxy());
event_loop.run_app(&mut RunningApp::<AppMessage> {
message_callback,
running,
@ -256,8 +260,6 @@ where
let StartCause::Init = cause else {
return;
};
#[cfg(all(target_os = "linux", feature = "xdg"))]
self.observe_darkmode_changes(event_loop.proxy());
self.running.started.store(true, Ordering::Relaxed);
for PendingWindow {
window,