From 9ee6ccae287f4ea37a0a1e20c8e237c85dd4f741 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 5 Apr 2006 19:47:49 +0000 Subject: * win/tkWinWm.c (WmProc): pass WM_QUERYENDSESSION message to Tk as WM_SAVE_YOURSELF wm protocol callback. --- win/tkWinWm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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; } -- cgit v0.12