From 6c4e45f3a69c71958e65fae9a15f82d0c5a27742 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 28 Jul 2020 13:00:55 +0300 Subject: Bump minimum supported Rust version to 1.43.0 --- alacritty/src/window.rs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'alacritty/src/window.rs') diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs index 81a61218..6659a9e0 100644 --- a/alacritty/src/window.rs +++ b/alacritty/src/window.rs @@ -176,22 +176,20 @@ impl Window { let mut wayland_surface = None; #[cfg(not(any(target_os = "macos", windows)))] - { - if event_loop.is_x11() { - // On X11, embed the window inside another if the parent ID has been set. - if let Some(parent_window_id) = window_config.embed { - x_embed_window(windowed_context.window(), parent_window_id); - } - } else { - // Apply client side decorations theme. - let theme = AlacrittyWaylandTheme::new(&config.colors); - windowed_context.window().set_wayland_theme(theme); - - // Attach surface to Alacritty's internal wayland queue to handle frame callbacks. - let surface = windowed_context.window().wayland_surface().unwrap(); - let proxy: Proxy = unsafe { Proxy::from_c_ptr(surface as _) }; - wayland_surface = Some(proxy.attach(wayland_event_queue.as_ref().unwrap().token())); + if event_loop.is_x11() { + // On X11, embed the window inside another if the parent ID has been set. + if let Some(parent_window_id) = window_config.embed { + x_embed_window(windowed_context.window(), parent_window_id); } + } else { + // Apply client side decorations theme. + let theme = AlacrittyWaylandTheme::new(&config.colors); + windowed_context.window().set_wayland_theme(theme); + + // Attach surface to Alacritty's internal wayland queue to handle frame callbacks. + let surface = windowed_context.window().wayland_surface().unwrap(); + let proxy: Proxy = unsafe { Proxy::from_c_ptr(surface as _) }; + wayland_surface = Some(proxy.attach(wayland_event_queue.as_ref().unwrap().token())); } Ok(Self { -- cgit