summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-04-05 19:47:49 (GMT)
committerhobbs <hobbs>2006-04-05 19:47:49 (GMT)
commit9ee6ccae287f4ea37a0a1e20c8e237c85dd4f741 (patch)
treef5c94eed113e11a9b11bd4517b37d3e62bb899fe /win
parent6d84721714414e438bf6f63af1acbd929f3c41d5 (diff)
downloadtk-9ee6ccae287f4ea37a0a1e20c8e237c85dd4f741.zip
tk-9ee6ccae287f4ea37a0a1e20c8e237c85dd4f741.tar.gz
tk-9ee6ccae287f4ea37a0a1e20c8e237c85dd4f741.tar.bz2
* win/tkWinWm.c (WmProc): pass WM_QUERYENDSESSION message to Tk as
WM_SAVE_YOURSELF wm protocol callback.
Diffstat (limited to 'win')
-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;
}