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:
parent
7fe5c27597
commit
eecbf203dc
5 changed files with 23 additions and 62 deletions
|
@ -63,9 +63,7 @@ use crate::platform::linux::is_within_click_distance;
|
|||
use crate::platform::linux::wayland::cursor::Cursor;
|
||||
use crate::platform::linux::wayland::serial::{SerialKind, SerialTracker};
|
||||
use crate::platform::linux::wayland::window::WaylandWindow;
|
||||
use crate::platform::linux::xdg_desktop_portal::{
|
||||
cursor_settings, Event as XDPEvent, XDPEventSource,
|
||||
};
|
||||
use crate::platform::linux::xdg_desktop_portal::{Event as XDPEvent, XDPEventSource};
|
||||
use crate::platform::linux::LinuxClient;
|
||||
use crate::platform::PlatformWindow;
|
||||
use crate::{
|
||||
|
@ -464,8 +462,6 @@ impl WaylandClient {
|
|||
})
|
||||
.unwrap();
|
||||
|
||||
let foreground = common.foreground_executor.clone();
|
||||
|
||||
let mut state = Rc::new(RefCell::new(WaylandClientState {
|
||||
serial_tracker: SerialTracker::new(),
|
||||
globals,
|
||||
|
@ -527,18 +523,6 @@ impl WaylandClient {
|
|||
pending_open_uri: None,
|
||||
}));
|
||||
|
||||
foreground
|
||||
.spawn({
|
||||
let state = state.clone();
|
||||
async move {
|
||||
if let Ok((theme, size)) = cursor_settings().await {
|
||||
let mut state = state.borrow_mut();
|
||||
state.cursor.set_theme(theme.as_str(), size);
|
||||
}
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
||||
WaylandSource::new(conn, event_queue)
|
||||
.insert(handle)
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue