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:
1 parent
967969e3c8
commit
58badcc64b
3 files changed
+25
No files matched your search
@@ -22,6 +22,16 @@ fn is_nvidia_gpu() -> bool {
|
||||
}
|
||||
|
||||
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
|
||||
// This makes GTK apps use native file pickers (e.g., KDE's on Plasma)
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"label": "main",
|
||||
"title": "QBZ",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
|
||||
@@ -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;
|
||||
Reference in new issue
Block a user