Repository: alacritty/alacritty
File: alacritty/src/window.rs (Rust)

Code before:
        let vsync = !event_loop.is_wayland();
        #[cfg(any(target_os = "macos", windows))]
        let vsync = true;
        let windowed_context =
            create_gl_window(window_builder.clone(), &event_loop, false, vsync, size)
                .or_else(|_| create_gl_window(window_builder, &event_loop, true, vsync, size))?;

        // Text cursor
        let current_mouse_cursor = CursorIcon::Text;
        windowed_context.window().set_cursor_icon(current_mouse_cursor);

        // Set OpenGL symbol loader. This call MUST be after window.make_current on windows.
        gl::load_with(|symbol| windowed_context.get_proc_address(symbol) as *const _);

        #[cfg(not(any(target_os = "macos", windows)))]
        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) = config.window.embed {
                    x_embed_window(windowed_context.window(), parent_window_id);
                }
            } else {
                // Apply CSD 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 {
            current_mouse_cursor,
            mouse_visible: true,
            windowed_context,
            #[cfg(not(any(target_os = "macos", windows)))]
            should_draw: Arc::new(AtomicBool::new(true)),
            #[cfg(not(any(target_os = "macos", windows)))]
            wayland_surface,
        })
    }

    pub fn set_inner_size(&mut self, size: PhysicalSize<u32>) {
        self.window().set_inner_size(size);
    }


Review comment (suggestion):
```suggestion
                // Apply client side decorations theme.
```

Just to make it a little bit easier to understand for people who don't know about things.

Code after:
        #[cfg(not(any(target_os = "macos", windows)))]
        let vsync = !event_loop.is_wayland();
        #[cfg(any(target_os = "macos", windows))]
        let vsync = true;

        let windowed_context =
            create_gl_window(window_builder.clone(), &event_loop, false, vsync, size)
                .or_else(|_| create_gl_window(window_builder, &event_loop, true, vsync, size))?;

        // Text cursor.
        let current_mouse_cursor = CursorIcon::Text;
        windowed_context.window().set_cursor_icon(current_mouse_cursor);

        // Set OpenGL symbol loader. This call MUST be after window.make_current on windows.
        gl::load_with(|symbol| windowed_context.get_proc_address(symbol) as *const _);

        #[cfg(not(any(target_os = "macos", windows)))]
        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) = config.window.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 {
            current_mouse_cursor,
            mouse_visible: true,
            windowed_context,
            #[cfg(not(any(target_os = "macos", windows)))]
            should_draw: Arc::new(AtomicBool::new(true)),
            #[cfg(not(any(target_os = "macos", windows)))]
            wayland_surface,
        })
    }

    pub fn set_inner_size(&mut self, size: PhysicalSize<u32>) {
        self.window().set_inner_size(size);