Fix 100s freeze on boot on X11 (#13156)

Release Notes:

- Fixed switching between dark and light mode with no windows open.
This commit is contained in:
Conrad Irwin 2024-06-17 12:44:32 -06:00 committed by GitHub
parent 7fe5c27597
commit eecbf203dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 62 deletions

View file

@ -479,6 +479,7 @@ impl AppContext {
Ok(mut window) => {
let root_view = build_root_view(&mut WindowContext::new(cx, &mut window));
window.root_view.replace(root_view.into());
WindowContext::new(cx, &mut window).defer(|cx| cx.appearance_changed());
cx.window_handles.insert(id, window.handle);
cx.windows.get_mut(id).unwrap().replace(window);
Ok(handle)