From c899208e15c8987480912794d66358ea2581fc39 Mon Sep 17 00:00:00 2001 From: Neil Stewart <40719351+madcdevelop@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:07:12 -0700 Subject: [PATCH] Fix app icon in alt+tab view on Windows --- CHANGELOG.md | 1 + alacritty/src/display/window.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 946f48ea..4d64bdf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its - Config import changes not being live reloaded - Cursor color requests with default cursor colors - Fullwidth semantic escape characters +- Windows app icon now displays properly in old alt+tab on Windows ## 0.13.2 diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs index 2bb59b2c..1427dc75 100644 --- a/alacritty/src/display/window.rs +++ b/alacritty/src/display/window.rs @@ -30,7 +30,7 @@ use winit::dpi::{PhysicalPosition, PhysicalSize}; use winit::event_loop::ActiveEventLoop; use winit::monitor::MonitorHandle; #[cfg(windows)] -use winit::platform::windows::IconExtWindows; +use winit::platform::windows::{IconExtWindows, WindowAttributesExtWindows}; use winit::raw_window_handle::{HasWindowHandle, RawWindowHandle}; use winit::window::{ CursorIcon, Fullscreen, ImePurpose, Theme, UserAttentionType, Window as WinitWindow, @@ -302,7 +302,8 @@ impl Window { WinitWindow::default_attributes() .with_decorations(window_config.decorations != Decorations::None) - .with_window_icon(icon.ok()) + .with_window_icon(icon.as_ref().ok().cloned()) + .with_taskbar_icon(icon.ok()) } #[cfg(target_os = "macos")]