From e11cfa9225b05415e12cf3b3cecc05103e62398a Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Mon, 30 Jan 2012 22:52:10 +0100 Subject: Revert "vcl: stuff" This reverts commit 3b90a3f1eaf9b98e52917d97b6991762d498c10d. --- vcl/unx/generic/app/saldisp.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 4c106651b9ed..90cfe61b65af 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -243,18 +243,14 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay, VisualID nDefVID = XVisualIDFromVisual( DefaultVisual( pDisplay, nScreen ) ); XVisualInfo aVI; -// aVI.visualid = nDefVID; aVI.screen = nScreen; // get all visuals int nVisuals; XVisualInfo* pVInfos = XGetVisualInfo( pDisplay, VisualScreenMask, &aVI, &nVisuals ); - if (!pVInfos) - return sal_False; - // HACK - rVI = *pVInfos; + rVI = pVInfos[ 0 ]; XFree( pVInfos ); return rVI.visualid == nDefVID; @@ -438,11 +434,10 @@ SalDisplay::initScreen( SalX11Screen nXScreen ) const if( SalDisplay::BestVisual( pDisp_, nXScreen.getXScreen(), aVI ) ) // DefaultVisual aColMap = DefaultColormap( pDisp_, nXScreen.getXScreen() ); else - fprintf( stderr, "HACK: XCreateColormap would be called...\n" ); -// aColMap = XCreateColormap( pDisp_, -// RootWindow( pDisp_, nXScreen.getXScreen() ), -// aVI.visual, -// AllocNone ); + aColMap = XCreateColormap( pDisp_, + RootWindow( pDisp_, nXScreen.getXScreen() ), + aVI.visual, + AllocNone ); Screen* pScreen = ScreenOfDisplay( pDisp_, nXScreen.getXScreen() ); -- cgit