diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-10-06 09:07:37 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-10-06 09:07:37 +0000 |
commit | 71dac80cc8a7652617832f06dbc2fac383b3d6b4 (patch) | |
tree | f1bec3340a66773e89e9865a368a936592882f3a /vcl/unx | |
parent | fccfef4812b07a56e2ea0b7dabe27bfa6ec78ea6 (diff) |
INTEGRATION: CWS impresshydra (1.14.46); FILE MERGED
2006/09/20 13:54:43 cl 1.14.46.4: RESYNC: (1.15-1.16); FILE MERGED
2006/08/28 13:13:04 cl 1.14.46.3: RESYNC: (1.14-1.15); FILE MERGED
2006/08/09 14:35:10 pl 1.14.46.2: #i67721# on the way to multiscreen support
2006/08/07 14:44:25 pl 1.14.46.1: #i67721# preparations for multi monitor support
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/source/window/salobj.cxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx index 187959034756..46cee4585341 100644 --- a/vcl/unx/source/window/salobj.cxx +++ b/vcl/unx/source/window/salobj.cxx @@ -4,9 +4,9 @@ * * $RCSfile: salobj.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: obo $ $Date: 2006-09-17 12:42:42 $ + * last change: $Author: kz $ $Date: 2006-10-06 10:07:37 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -99,9 +99,13 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p Display* pDisp = pSalDisp->GetDisplay(); XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow; + // find out on which screen that window is + XWindowAttributes aParentAttr; + XGetWindowAttributes( pDisp, aObjectParent, &aParentAttr ); + int nScreen = XScreenNumberOfScreen( aParentAttr.screen ); Visual* pVisual = (pWindowData && pWindowData->pVisual) ? (Visual*)pWindowData->pVisual : - pSalDisp->GetVisual()->GetVisual(); + pSalDisp->GetVisual( nScreen ).GetVisual(); // get visual info VisualID aVisID = XVisualIDFromVisual( pVisual ); XVisualInfo aTemplate; @@ -128,32 +132,32 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p aObjectParent, 0, 0, 1, 1, 0, - pSalDisp->GetColormap().GetBlackPixel(), - pSalDisp->GetColormap().GetWhitePixel() + pSalDisp->GetColormap( nScreen ).GetBlackPixel(), + pSalDisp->GetColormap( nScreen ).GetWhitePixel() ); - if( aVisID == pSalDisp->GetVisual()->GetVisualId() ) + if( aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ) { pObject->maSecondary = XCreateSimpleWindow( pDisp, pObject->maPrimary, 0, 0, 1, 1, 0, - pSalDisp->GetColormap().GetBlackPixel(), - pSalDisp->GetColormap().GetWhitePixel() + pSalDisp->GetColormap( nScreen ).GetBlackPixel(), + pSalDisp->GetColormap( nScreen ).GetWhitePixel() ); } else { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "visual id of vcl %x, of visual %x\n", - pSalDisp->GetVisual()->GetVisualId(), + pSalDisp->GetVisual( nScreen ).GetVisualId(), aVisID ); #endif BOOL bOldIgnore = pSalDisp->GetXLib()->GetIgnoreXErrors(); pSalDisp->GetXLib()->SetIgnoreXErrors(TRUE); pObject->maSecondary = XCreateWindow( pDisp, - pSalDisp->GetRootWindow(), + pSalDisp->GetRootWindow( nScreen ), 0, 0, 1, 1, 0, nDepth, InputOutput, @@ -179,8 +183,8 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p pObjData->pWidget = NULL; pObjData->pVisual = pVisual; pObjData->nDepth = nDepth; - pObjData->aColormap = aVisID == pSalDisp->GetVisual()->GetVisualId() ? - pSalDisp->GetColormap().GetXColormap() : None; + pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ? + pSalDisp->GetColormap( nScreen ).GetXColormap() : None; pObjData->pAppContext = NULL; BOOL bOldIgnore = pSalDisp->GetXLib()->GetIgnoreXErrors(); |