diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-09-17 02:16:33 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-09-17 02:16:33 +0000 |
commit | a80ba0fa71361eccc7ed4907d94157d1b41bf452 (patch) | |
tree | 3f5f71cc20e5e32b4fe264f9a032d339808e3368 /src/xfns.c | |
parent | 432eb2f9ac64ccf97383b6ef18a5d844144b303e (diff) | |
download | emacs-a80ba0fa71361eccc7ed4907d94157d1b41bf452.tar.gz |
(hack_wm_protocols): Arrange to handle WM_SAVE_YOURSELF.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/xfns.c b/src/xfns.c index 8cb1f9d107c..19ca98b3175 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1743,9 +1743,9 @@ XSetWMProtocols (dpy, w, protocols, count) #ifdef USE_X_TOOLKIT -/* If the WM_PROTOCOLS property does not already contain WM_TAKE_FOCUS - and WM_DELETE_WINDOW, then add them. (They may already be present - because of the toolkit (Motif adds them, for example, but Xt doesn't). */ +/* WM_DELETE_WINDOW, and WM_SAVE_YOURSELF, then add them. (They may + already be present because of the toolkit (Motif adds some of them, + for example, but Xt doesn't). */ static void hack_wm_protocols (widget) @@ -1755,6 +1755,7 @@ hack_wm_protocols (widget) Window w = XtWindow (widget); int need_delete = 1; int need_focus = 1; + int need_save = 1; BLOCK_INPUT; { @@ -1771,16 +1772,18 @@ hack_wm_protocols (widget) while (nitems > 0) { nitems--; - if (atoms [nitems] == Xatom_wm_delete_window) need_delete = 0; - else if (atoms [nitems] == Xatom_wm_take_focus) need_focus = 0; + if (atoms[nitems] == Xatom_wm_delete_window) need_delete = 0; + else if (atoms[nitems] == Xatom_wm_take_focus) need_focus = 0; + else if (atoms[nitems] == Xatom_wm_save_yourself) need_save = 0; } if (atoms) XFree ((char *) atoms); } { Atom props [10]; int count = 0; - if (need_delete) props [count++] = Xatom_wm_delete_window; - if (need_focus) props [count++] = Xatom_wm_take_focus; + if (need_delete) props[count++] = Xatom_wm_delete_window; + if (need_focus) props[count++] = Xatom_wm_take_focus; + if (need_save) props[count++] = Xatom_wm_save_yourself; if (count) XChangeProperty (dpy, w, Xatom_wm_protocols, XA_ATOM, 32, PropModeAppend, (unsigned char *) props, count); |