From 0f093bdb1e0f54aeca1d9a8a0e55026d9623ccbd Mon Sep 17 00:00:00 2001 From: logikonline Date: Sat, 24 Jan 2026 07:28:36 +0000 Subject: [PATCH] Update X11Window.cs --- Window/X11Window.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Window/X11Window.cs b/Window/X11Window.cs index adf0367..6d3f5d2 100644 --- a/Window/X11Window.cs +++ b/Window/X11Window.cs @@ -151,7 +151,14 @@ public class X11Window : IDisposable X11.XStoreName(_display, _window, title); // Set WM_CLASS for desktop integration (taskbar icon matching) - SetWMClass(title.Replace(" ", ""), title.Replace(" ", "")); + // Use application name from environment or process path for proper desktop matching + string? appName = Environment.GetEnvironmentVariable("APPIMAGE_NAME"); + if (string.IsNullOrEmpty(appName)) + { + appName = System.IO.Path.GetFileNameWithoutExtension(Environment.ProcessPath ?? "MauiApp"); + } + string wmClass = appName.Replace(" ", "").Replace("_", ""); + SetWMClass(wmClass, wmClass); // Select input events X11.XSelectInput(_display, _window,