diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-02 12:36:25 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-02 12:36:25 +0000 |
commit | 579c95fb426921697b477ce0849196cec8fc8fa6 (patch) | |
tree | f5e49ff9813d2a3305bc5b45623c8b65cfed874b | |
parent | 38d924addcead0b3195a8b3a8b29cfc17ad49763 (diff) |
INTEGRATION: CWS canvas02 (1.4.450); FILE MERGED
2005/10/09 09:04:46 thb 1.4.450.2: RESYNC: (1.4-1.5); FILE MERGED
2005/07/28 15:00:35 thb 1.4.450.1: Join from cws_src680_glcanvas: needed the SystemChildWindow stuff also here
-rw-r--r-- | vcl/win/source/window/salobj.cxx | 60 |
1 files changed, 51 insertions, 9 deletions
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx index 551275404af2..619e4d6a4334 100644 --- a/vcl/win/source/window/salobj.cxx +++ b/vcl/win/source/window/salobj.cxx @@ -4,9 +4,9 @@ * * $RCSfile: salobj.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: rt $ $Date: 2005-09-09 14:09:18 $ + * last change: $Author: kz $ $Date: 2005-11-02 13:36:25 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -192,7 +192,7 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg ) { ImplSalYieldMutexAcquireWithWait(); pObject = ImplFindSalObject( pMsg->hwnd ); - if ( pObject ) + if ( pObject && !pObject->IsMouseTransparent() ) ImplPostMessage( pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0 ); ImplSalYieldMutexRelease(); } @@ -323,7 +323,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l { ImplSalYieldMutexAcquireWithWait(); pSysObj = GetSalObjWindowPtr( hWnd ); - if ( pSysObj ) + if ( pSysObj && !pSysObj->IsMouseTransparent() ) pSysObj->CallCallback( SALOBJ_EVENT_TOTOP, 0 ); ImplSalYieldMutexRelease(); } @@ -331,7 +331,13 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l break; case WM_MOUSEACTIVATE: - ImplPostMessage( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + { + ImplSalYieldMutexAcquireWithWait(); + pSysObj = GetSalObjWindowPtr( hWnd ); + if ( pSysObj && !pSysObj->IsMouseTransparent() ) + ImplPostMessage( hWnd, SALOBJ_MSG_TOTOP, 0, 0 ); + ImplSalYieldMutexRelease(); + } break; case SALOBJ_MSG_TOTOP: @@ -424,12 +430,19 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA switch( nMsg ) { // Wegen PlugIn's loeschen wir erstmal den Hintergrund -/* case WM_ERASEBKGND: - nRet = 1; - rDef = FALSE; + { + WinSalObject* pSysObj = GetSalObjWindowPtr( ::GetParent( hWnd ) ); + + if( pSysObj && !pSysObj->IsEraseBackgroundEnabled() ) + { + // do not erase background + nRet = 1; + rDef = FALSE; + } + } break; -*/ + case WM_PAINT: { PAINTSTRUCT aPs; @@ -438,6 +451,35 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA rDef = FALSE; } break; + + case WM_MOUSEMOVE: + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + { + WinSalObject* pSysObj; + pSysObj = GetSalObjWindowPtr( ::GetParent( hWnd ) ); + + if( pSysObj && pSysObj->IsMouseTransparent() ) + { + // forward mouse events to parent frame + HWND hWndParent = ::GetParent( pSysObj->mhWnd ); + + // transform coordinates + POINT pt; + pt.x = (long) LOWORD( lParam ); + pt.y = (long) HIWORD( lParam ); + MapWindowPoints( hWnd, hWndParent, &pt, 1 ); + lParam = MAKELPARAM( (WORD) pt.x, (WORD) pt.y ); + + nRet = ImplSendMessage( hWndParent, nMsg, wParam, lParam ); + rDef = FALSE; + } + } + break; } return nRet; |