Bug#639925: /usr/bin/vim.gnome: WM_CLASS property differs when vim is launched as 'vim' or 'gvim';

Sam Morris sam at robots.org.uk
Thu Sep 1 10:39:15 UTC 2011


tag 639925 + patch
thanks

Here's a patch that sets the second string in WM_CLASS to match the name
of gvim.desktop.

-- 
Sam Morris <sam at robots.org.uk>
-------------- next part --------------
Description: Upstream changes introduced in version 2:7.3.280-1sam1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 vim (2:7.3.280-1sam1) unstable; urgency=low
 .
   * Ensure all GTK+ windows get a WM_CLASS property that matches the shipped
     .desktop file. Closes: #639925.
 .
 The person named in the Author field signed this changelog entry.
Author: Sam Morris <sam at robots.org.uk>
Bug-Debian: http://bugs.debian.org/639925

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- vim-7.3.280.orig/src/gui_gtk_x11.c
+++ vim-7.3.280/src/gui_gtk_x11.c
@@ -1425,6 +1425,11 @@ gui_mch_init_check(void)
 	using_gnome = 1;
 #endif
 
+    /* This defaults to argv[0], but we want it to match the name of
+     * the shipped file 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))
     {


More information about the pkg-vim-maintainers mailing list