summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-06-13 20:41:21 +0000
committerRichard M. Stallman <rms@gnu.org>1994-06-13 20:41:21 +0000
commit0ab983c80fae7ec7a868417a6fb02f4ad0f95392 (patch)
tree08f2a8cbb05d69bd2669ddc91be9d751855ba926 /src/xterm.c
parente29f86e4e8f603b1d53aa2a054d2a0eefaea0209 (diff)
downloademacs-0ab983c80fae7ec7a868417a6fb02f4ad0f95392.tar.gz
(XTread_socket): Handle Xatom_wm_save_yourself by calling XSetCommand.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1eccf57cae4..f2b0449a991 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -178,6 +178,10 @@ static FONT_TYPE *icon_font_info;
extern Lisp_Object Vcommand_line_args;
char *hostname, *x_id_name;
+/* Initial values of argv and argc. */
+extern char **initial_argv;
+extern int initial_argc;
+
/* This is the X connection that we are using. */
Display *x_current_display;
@@ -3440,6 +3444,17 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
a keyboard or mouse event arrives. */
if (numchars > 0)
{
+ /* This is just so we only give real data once
+ for a single Emacs process. */
+ if (event.xclient.window
+ == FRAME_X_WINDOW (selected_frame))
+ XSetCommand (x_current_display,
+ event.xclient.window,
+ initial_argv, initial_argc);
+ else
+ XSetCommand (x_current_display,
+ event.xclient.window,
+ 0, 0);
}
}
else if (event.xclient.data.l[0] == Xatom_wm_delete_window)