diff options
author | hobbs <hobbs> | 2006-04-05 19:47:49 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2006-04-05 19:47:49 (GMT) |
commit | 7ac08f5128805121c16321195cb01180c4018182 (patch) | |
tree | f5c94eed113e11a9b11bd4517b37d3e62bb899fe | |
parent | 16d782cbeb85a3af3682b581e00989f5f7968c70 (diff) | |
download | tk-7ac08f5128805121c16321195cb01180c4018182.zip tk-7ac08f5128805121c16321195cb01180c4018182.tar.gz tk-7ac08f5128805121c16321195cb01180c4018182.tar.bz2 |
* win/tkWinWm.c (WmProc): pass WM_QUERYENDSESSION message to Tk as
WM_SAVE_YOURSELF wm protocol callback.
-rw-r--r-- | win/tkWinWm.c | 14 |
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; } |