diff options
author | Stephan Schäfer <ssa@openoffice.org> | 2002-11-18 16:04:55 +0000 |
---|---|---|
committer | Stephan Schäfer <ssa@openoffice.org> | 2002-11-18 16:04:55 +0000 |
commit | 55e797d79822be7440c1853cdccaeebfd4216ab6 (patch) | |
tree | 2cfe98fb769e523eb0fa521e9f27bf03922d8a93 | |
parent | 470c93a6b472e13720d51569a779540c224f93d6 (diff) |
#104827# provide notification for enable/disable input
-rw-r--r-- | vcl/source/window/window.cxx | 19 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 27 |
2 files changed, 35 insertions, 11 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 9f59889622c9..918f3f53d9b2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2,9 +2,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.152 $ + * $Revision: 1.153 $ * - * last change: $Author: ssa $ $Date: 2002-11-18 12:56:55 $ + * last change: $Author: ssa $ $Date: 2002-11-18 17:04:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -6206,6 +6206,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); + BOOL bNotify = (bEnable != mbInputDisabled); if ( mpBorderWindow ) { mpBorderWindow->EnableInput( bEnable, FALSE ); @@ -6250,6 +6251,13 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild ) if ( IsReallyVisible() ) ImplGenerateMouseMove(); + + // #104827# notify parent + if ( bNotify && GetParent() ) + { + NotifyEvent aNEvt( bEnable ? EVENT_INPUTENABLE : EVENT_INPUTDISABLE, this ); + GetParent()->Notify( aNEvt ); + } } // ----------------------------------------------------------------------- @@ -6264,7 +6272,8 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, { // pExculeWindow is the first Overlap-Frame --> if this // shouldn't be the case, than this must be changed in dialog.cxx - pExcludeWindow = pExcludeWindow->ImplGetFirstOverlapWindow(); + if( pExcludeWindow ) + pExcludeWindow = pExcludeWindow->ImplGetFirstOverlapWindow(); Window* pSysWin = mpFrameWindow->mpFrameData->mpFirstOverlap; while ( pSysWin ) { @@ -6273,7 +6282,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow->ImplIsWindowOrChild( pSysWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, TRUE ) ) pSysWin->EnableInput( bEnable, bChild ); } pSysWin = pSysWin->mpNextOverlap; @@ -6290,7 +6299,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin, { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, TRUE ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, TRUE ) ) pFrameWin->EnableInput( bEnable, bChild ); } } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 0232ce624cb7..d86bd1dfaaf0 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salframe.cxx,v $ * - * $Revision: 1.77 $ + * $Revision: 1.78 $ * - * last change: $Author: ssa $ $Date: 2002-11-14 09:46:35 $ + * last change: $Author: ssa $ $Date: 2002-11-18 17:04:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -4791,10 +4791,25 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP case WM_ENABLE: // #95133# a system dialog is opened/closed, using our app window as parent - if( !wParam ) - ImplGetSVData()->maAppData.mnModalMode++; - else - ImplGetSVData()->maAppData.mnModalMode--; + { + SalFrame* pFrame = GetWindowPtr( hWnd ); + Window *pWin = NULL; + if( pFrame ) + pWin = ((Window*)pFrame->maFrameData.mpInst); + + if( !wParam ) + { + ImplGetSVData()->maAppData.mnModalMode++; + if( pWin ) + pWin->EnableInput( FALSE, TRUE, TRUE, NULL ); + } + else + { + ImplGetSVData()->maAppData.mnModalMode--; + if( pWin ) + pWin->EnableInput( TRUE, TRUE, TRUE, NULL ); + } + } break; case WM_KILLFOCUS: |