fix: improve app identification in task managers

Set GTK_APPLICATION_ID for proper WM_CLASS and add desktop template
with StartupWMClass for correct process identification on Linux.
Also add window label for Tauri window configuration.
This commit is contained in:
vicrodh committed 2026-01-23 01:50:27 -06:00
1 parent 967969e3c8
commit 58badcc64b
3 files changed
+25

No files matched your search

+10
View File
@@ -22,6 +22,16 @@ fn is_nvidia_gpu() -> bool {
} }
fn main() { fn main() {
// Set the application name/class for Linux window managers
// This helps task managers and window switchers identify the app correctly
#[cfg(target_os = "linux")]
{
// Set program name (affects WM_CLASS)
std::env::set_var("GTK_APPLICATION_ID", "com.blitzfc.qbz");
// GLib program name helps with process identification
// This is set before any GTK initialization
}
// Use xdg-desktop-portal for file dialogs on Linux // Use xdg-desktop-portal for file dialogs on Linux
// This makes GTK apps use native file pickers (e.g., KDE's on Plasma) // This makes GTK apps use native file pickers (e.g., KDE's on Plasma)
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
+1
View File
@@ -12,6 +12,7 @@
"app": { "app": {
"windows": [ "windows": [
{ {
"label": "main",
"title": "QBZ", "title": "QBZ",
"width": 1280, "width": 1280,
"height": 800, "height": 800,
+14
View File
@@ -0,0 +1,14 @@
[Desktop Entry]
Name={{name}}
{{#if comment}}
Comment={{comment}}
{{/if}}
Exec={{exec}}
Type=Application
Icon={{icon}}
Categories={{categories}}
Terminal=false
StartupWMClass=com.blitzfc.qbz
StartupNotify=true
Keywords=music;audio;qobuz;hifi;streaming;audiophile;flac;
MimeType=x-scheme-handler/qbz;