Hi Bram,

When the GUI is launched by using ":gui" from Vim or when the binary is
not named gvim (like vim.gtk in Debian), the WM_CLASS X property isn't
set correctly.

Sam Morris provided the attached patch so WM_CLASS is consistently set,
which also ensures the correct .desktop file is found when window
managers try to find the tray icon for Vim.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@debian.org>
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1447,6 +1447,11 @@
 	using_gnome = 1;
 #endif
 
+    /* This defaults to argv[0], but we want it to match the name of
+     * the shipped gvim.desktop so that Vim's windows can be
+     * associated with this file. */
+    g_set_prgname("gvim");
+
     /* Don't use gtk_init() or gnome_init(), it exits on failure. */
     if (!gtk_init_check(&gui_argc, &gui_argv))
     {

Attachment: signature.asc
Description: Digital signature

Reply via email to