aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src/window.rs')
-rw-r--r--alacritty/src/window.rs28
1 files changed, 13 insertions, 15 deletions
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<WlSurface> = 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<WlSurface> = unsafe { Proxy::from_c_ptr(surface as _) };
+ wayland_surface = Some(proxy.attach(wayland_event_queue.as_ref().unwrap().token()));
}
Ok(Self {