summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/window/salobj.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-01-14 23:25:55 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-16 09:28:29 +0000
commit8d151e0e55e1945bc5f633dc916372a3ea27a16d (patch)
tree96a6a50329fd6b6b57cc1e266d16b8464d4b8b2a /vcl/unx/generic/window/salobj.cxx
parenta5247645b4d133056ded317b1ed0e9e590afcf4d (diff)
vcl: introduce crystal clear separation between X11 Screens and DisplayScreens
A DisplayScreen is a screen index as used by the upper level abstractions, an X11Screen is a wrapper around an integer X screen index.
Diffstat (limited to 'vcl/unx/generic/window/salobj.cxx')
-rw-r--r--vcl/unx/generic/window/salobj.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index 3e576604623b..db344ed528e8 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -81,10 +81,10 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
// find out on which screen that window is
XWindowAttributes aParentAttr;
XGetWindowAttributes( pDisp, aObjectParent, &aParentAttr );
- int nScreen = XScreenNumberOfScreen( aParentAttr.screen );
+ SalX11Screen nXScreen( XScreenNumberOfScreen( aParentAttr.screen ) );
Visual* pVisual = (pWindowData && pWindowData->pVisual) ?
(Visual*)pWindowData->pVisual :
- pSalDisp->GetVisual( nScreen ).GetVisual();
+ pSalDisp->GetVisual( nXScreen ).GetVisual();
// get visual info
VisualID aVisID = XVisualIDFromVisual( pVisual );
XVisualInfo aTemplate;
@@ -111,25 +111,25 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
aObjectParent,
0, 0,
1, 1, 0,
- pSalDisp->GetColormap( nScreen ).GetBlackPixel(),
- pSalDisp->GetColormap( nScreen ).GetWhitePixel()
+ pSalDisp->GetColormap( nXScreen ).GetBlackPixel(),
+ pSalDisp->GetColormap( nXScreen ).GetWhitePixel()
);
- if( aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() )
+ if( aVisID == pSalDisp->GetVisual( nXScreen ).GetVisualId() )
{
pObject->maSecondary =
XCreateSimpleWindow( pDisp,
pObject->maPrimary,
0, 0,
1, 1, 0,
- pSalDisp->GetColormap( nScreen ).GetBlackPixel(),
- pSalDisp->GetColormap( nScreen ).GetWhitePixel()
+ pSalDisp->GetColormap( nXScreen ).GetBlackPixel(),
+ pSalDisp->GetColormap( nXScreen ).GetWhitePixel()
);
}
else
{
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "visual id of vcl %x, of visual %x\n",
- static_cast<unsigned int> (pSalDisp->GetVisual( nScreen ).GetVisualId()),
+ static_cast<unsigned int> (pSalDisp->GetVisual( nXScreen ).GetVisualId()),
static_cast<unsigned int> (aVisID) );
#endif
GetGenericData()->ErrorTrapPush();
@@ -137,13 +137,13 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
// create colormap for visual - there might not be one
pObject->maColormap = aAttribs.colormap = XCreateColormap(
pDisp,
- pSalDisp->GetRootWindow( nScreen ),
+ pSalDisp->GetRootWindow( nXScreen ),
pVisual,
AllocNone );
pObject->maSecondary =
XCreateWindow( pDisp,
- pSalDisp->GetRootWindow( nScreen ),
+ pSalDisp->GetRootWindow( nXScreen ),
0, 0,
1, 1, 0,
nDepth, InputOutput,
@@ -170,8 +170,8 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pObjData->pWidget = NULL;
pObjData->pVisual = pVisual;
pObjData->nDepth = nDepth;
- pObjData->aColormap = aVisID == pSalDisp->GetVisual( nScreen ).GetVisualId() ?
- pSalDisp->GetColormap( nScreen ).GetXColormap() : None;
+ pObjData->aColormap = aVisID == pSalDisp->GetVisual( nXScreen ).GetVisualId() ?
+ pSalDisp->GetColormap( nXScreen ).GetXColormap() : None;
pObjData->pAppContext = NULL;
XSync(pDisp, False);