aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-13 20:41:21 +0000
committerRichard M. Stallman1994-06-13 20:41:21 +0000
commit0ab983c80fae7ec7a868417a6fb02f4ad0f95392 (patch)
tree08f2a8cbb05d69bd2669ddc91be9d751855ba926 /src
parente29f86e4e8f603b1d53aa2a054d2a0eefaea0209 (diff)
downloademacs-0ab983c80fae7ec7a868417a6fb02f4ad0f95392.tar.gz
emacs-0ab983c80fae7ec7a868417a6fb02f4ad0f95392.zip
(XTread_socket): Handle Xatom_wm_save_yourself by calling XSetCommand.
Diffstat (limited to 'src')
-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;
178extern Lisp_Object Vcommand_line_args; 178extern Lisp_Object Vcommand_line_args;
179char *hostname, *x_id_name; 179char *hostname, *x_id_name;
180 180
181/* Initial values of argv and argc. */
182extern char **initial_argv;
183extern int initial_argc;
184
181/* This is the X connection that we are using. */ 185/* This is the X connection that we are using. */
182 186
183Display *x_current_display; 187Display *x_current_display;
@@ -3440,6 +3444,17 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
3440 a keyboard or mouse event arrives. */ 3444 a keyboard or mouse event arrives. */
3441 if (numchars > 0) 3445 if (numchars > 0)
3442 { 3446 {
3447 /* This is just so we only give real data once
3448 for a single Emacs process. */
3449 if (event.xclient.window
3450 == FRAME_X_WINDOW (selected_frame))
3451 XSetCommand (x_current_display,
3452 event.xclient.window,
3453 initial_argv, initial_argc);
3454 else
3455 XSetCommand (x_current_display,
3456 event.xclient.window,
3457 0, 0);
3443 } 3458 }
3444 } 3459 }
3445 else if (event.xclient.data.l[0] == Xatom_wm_delete_window) 3460 else if (event.xclient.data.l[0] == Xatom_wm_delete_window)