Skip to content

Commit

Permalink
Hard-code argv[0] for gtk_init() to "emacs"
Browse files Browse the repository at this point in the history
This ensures that gtk sets the WM_CLASS to Emacs not Emacs-gtk or similar since
it also uses the value of argv[0] when choosing this. Should completely resolve
issue #83.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
  • Loading branch information
alexmurray committed Feb 23, 2024
1 parent c54ae93 commit d08a52e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions emacs-name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,16 @@ index 712826d57b7..ed8e8d8e624 100644
Vinvocation_directory = Ffile_name_directory (raw_name);

/* If we got no directory in argv[0], search PATH to find where
diff --git a/src/xterm.c b/src/xterm.c
index 524e2a32574..22d319c5999 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -29489,6 +29489,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
argv[argc] = 0;

argc = 0;
- argv[argc++] = initial_argv[0];
+ argv[argc++] = "emacs";

if (! NILP (display_name))
{

0 comments on commit d08a52e

Please sign in to comment.