summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2006-04-05 19:47:48 (GMT)
committerhobbs <hobbs@noemail.net>2006-04-05 19:47:48 (GMT)
commit3745cc908f7f8c43cb2a6bac37bf6cd60190d188 (patch)
treef5c94eed113e11a9b11bd4517b37d3e62bb899fe
parent7e69afbe203caf851a599eef08c539b90340d5f8 (diff)
downloadtk-3745cc908f7f8c43cb2a6bac37bf6cd60190d188.zip
tk-3745cc908f7f8c43cb2a6bac37bf6cd60190d188.tar.gz
tk-3745cc908f7f8c43cb2a6bac37bf6cd60190d188.tar.bz2
* win/tkWinWm.c (WmProc): pass WM_QUERYENDSESSION message to Tk as
WM_SAVE_YOURSELF wm protocol callback. FossilOrigin-Name: c2e502ce10853ee46d06a0fe0ef39c3fe7561d87
-rw-r--r--win/tkWinWm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 38a1297..f10010b 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.23 2005/12/01 18:31:43 dgp Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.24 2006/04/05 19:47:49 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -7453,6 +7453,18 @@ WmProc(hwnd, message, wParam, lParam)
goto done;
}
+ case WM_QUERYENDSESSION: {
+ XEvent event;
+
+ winPtr = GetTopLevel(hwnd);
+ event.xclient.message_type =
+ Tk_InternAtom((Tk_Window) winPtr, "WM_PROTOCOLS");
+ event.xclient.data.l[0] =
+ Tk_InternAtom((Tk_Window) winPtr, "WM_SAVE_YOURSELF");
+ TkWmProtocolEventProc(winPtr, &event);
+ break;
+ }
+
default:
break;
}