OpenJDK / jigsaw / jake / jdk
changeset 1050:9cdba92883bf
6792023: Print suspends on Windows 2000 Pro since 6u12 b01
Reviewed-by: art, anthony
author | dcherepanov |
---|---|
date | Tue, 17 Feb 2009 14:30:52 +0300 |
parents | 5453a374c1d5 |
children | e03aa9d6b8d5 |
files | src/windows/native/sun/windows/awt_FileDialog.cpp src/windows/native/sun/windows/awt_PrintDialog.cpp src/windows/native/sun/windows/awt_PrintJob.cpp src/windows/native/sun/windows/awt_Window.h |
diffstat | 4 files changed, 25 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_FileDialog.cpp Tue Feb 17 14:27:03 2009 +0300 +++ b/src/windows/native/sun/windows/awt_FileDialog.cpp Tue Feb 17 14:30:52 2009 +0300 @@ -101,7 +101,8 @@ } } - return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam); + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp)); + return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam); } static UINT_PTR CALLBACK @@ -135,16 +136,19 @@ } // subclass dialog's parent to receive additional messages - ComCtl32Util::GetInstance().SubclassHWND(parent, - FileDialogWndProc); + WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(parent, + FileDialogWndProc); + ::SetProp(parent, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc)); break; } case WM_DESTROY: { + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(parent, NativeDialogWndProcProp)); ComCtl32Util::GetInstance().UnsubclassHWND(parent, FileDialogWndProc, - NULL); + lpfnWndProc); ::RemoveProp(parent, ModalDialogPeerProp); + ::RemoveProp(parent, NativeDialogWndProcProp); break; } case WM_NOTIFY: {
--- a/src/windows/native/sun/windows/awt_PrintDialog.cpp Tue Feb 17 14:27:03 2009 +0300 +++ b/src/windows/native/sun/windows/awt_PrintDialog.cpp Tue Feb 17 14:30:52 2009 +0300 @@ -65,7 +65,8 @@ } } - return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam); + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp)); + return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam); } static UINT_PTR CALLBACK @@ -99,16 +100,19 @@ } // subclass dialog's parent to receive additional messages - ComCtl32Util::GetInstance().SubclassHWND(hdlg, - PrintDialogWndProc); + WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(hdlg, + PrintDialogWndProc); + ::SetProp(hdlg, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc)); break; } case WM_DESTROY: { + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hdlg, NativeDialogWndProcProp)); ComCtl32Util::GetInstance().UnsubclassHWND(hdlg, PrintDialogWndProc, - NULL); + lpfnWndProc); ::RemoveProp(hdlg, ModalDialogPeerProp); + ::RemoveProp(hdlg, NativeDialogWndProcProp); break; } }
--- a/src/windows/native/sun/windows/awt_PrintJob.cpp Tue Feb 17 14:27:03 2009 +0300 +++ b/src/windows/native/sun/windows/awt_PrintJob.cpp Tue Feb 17 14:30:52 2009 +0300 @@ -2885,7 +2885,8 @@ } } - return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam); + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp)); + return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam); } /** @@ -2919,16 +2920,19 @@ } // subclass dialog's parent to receive additional messages - ComCtl32Util::GetInstance().SubclassHWND(hDlg, - PageDialogWndProc); + WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(hDlg, + PageDialogWndProc); + ::SetProp(hDlg, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc)); break; } case WM_DESTROY: { + WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hDlg, NativeDialogWndProcProp)); ComCtl32Util::GetInstance().UnsubclassHWND(hDlg, PageDialogWndProc, - NULL); + lpfnWndProc); ::RemoveProp(hDlg, ModalDialogPeerProp); + ::RemoveProp(hDlg, NativeDialogWndProcProp); break; } }
--- a/src/windows/native/sun/windows/awt_Window.h Tue Feb 17 14:27:03 2009 +0300 +++ b/src/windows/native/sun/windows/awt_Window.h Tue Feb 17 14:30:52 2009 +0300 @@ -34,6 +34,7 @@ // property name tagging windows disabled by modality static LPCTSTR ModalBlockerProp = TEXT("SunAwtModalBlockerProp"); static LPCTSTR ModalDialogPeerProp = TEXT("SunAwtModalDialogPeerProp"); +static LPCTSTR NativeDialogWndProcProp = TEXT("SunAwtNativeDialogWndProcProp"); #ifndef WH_MOUSE_LL #define WH_MOUSE_LL 14