From 90bf9a073fee52350bb2ea15f31395eceb4540ff Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Wed, 20 Jan 2010 01:33:49 +0300 Subject: [PATCH] 6660258: Java application stops Windows logout/shutdown (regression in 1.5.0_14) Reviewed-by: anthony, art, uta --- jdk/src/windows/native/sun/windows/awt_Component.cpp | 4 +++- jdk/src/windows/native/sun/windows/awtmsg.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jdk/src/windows/native/sun/windows/awt_Component.cpp b/jdk/src/windows/native/sun/windows/awt_Component.cpp index b2767bac72c..d98f241a145 100644 --- a/jdk/src/windows/native/sun/windows/awt_Component.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp @@ -378,7 +378,9 @@ LRESULT CALLBACK AwtComponent::WndProc(HWND hWnd, UINT message, TRY; AwtComponent * self = AwtComponent::GetComponentImpl(hWnd); - if (self == NULL || self->GetHWnd() != hWnd) { + if (self == NULL || self->GetHWnd() != hWnd || + message == WM_UNDOCUMENTED_CLIENTSHUTDOWN) // handle log-off gracefully + { return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam); } else { return self->WindowProc(message, wParam, lParam); diff --git a/jdk/src/windows/native/sun/windows/awtmsg.h b/jdk/src/windows/native/sun/windows/awtmsg.h index 6eb06b01db5..6f62d75e37b 100644 --- a/jdk/src/windows/native/sun/windows/awtmsg.h +++ b/jdk/src/windows/native/sun/windows/awtmsg.h @@ -253,4 +253,8 @@ enum { #define WM_UNDOCUMENTED_CLICKMENUBAR 0x0313 #endif +#ifndef WM_UNDOCUMENTED_CLIENTSHUTDOWN +#define WM_UNDOCUMENTED_CLIENTSHUTDOWN 0x003b +#endif + #endif // AWTMSG_H