From 7e34690e0c7518c515d7e58ef622be2cc5ccf62f Mon Sep 17 00:00:00 2001 From: deepend-tildeclub Date: Tue, 19 May 2026 17:20:08 -0600 Subject: [PATCH] Set Windows AppUserModelID before GTK startup --- src/fe-gtk/fe-gtk.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index edea0fb3..4e2b01c3 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -124,6 +124,25 @@ create_msg_dialog (gchar *title, gchar *message) static char *win32_argv0_dir; +static void +win32_set_appusermodelid (void) +{ + HMODULE shell32; + HRESULT (WINAPI *set_appid) (PCWSTR); + + shell32 = GetModuleHandleW (L"shell32.dll"); + if (!shell32) + shell32 = LoadLibraryW (L"shell32.dll"); + if (!shell32) + return; + + set_appid = (HRESULT (WINAPI *) (PCWSTR)) GetProcAddress (shell32, "SetCurrentProcessExplicitAppUserModelID"); + if (!set_appid) + return; + + set_appid (L"ZoiteChat.Desktop.Notify"); +} + static void win32_set_gsettings_schema_dir (void) { @@ -422,6 +441,7 @@ fe_args (int argc, char *argv[]) #ifdef WIN32 win32_set_gsettings_schema_dir (); + win32_set_appusermodelid (); win32_configure_pixbuf_loaders (); /* this is mainly for irc:// URL handling. When windows calls us from */