Commit 6f01462b authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

Fixed ugly disabled controls and black background in Write and Lotus

Notes.
parent 026f705d
......@@ -1293,7 +1293,7 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst,
{
XSetFunction( display, physDevDst->gc, GXcopy );
XSetForeground( display, physDevDst->gc,
X11DRV_PALETTE_PaletteToXPixel[X11DRV_DevCaps.sizePalette - 1]);
WhitePixelOfScreen( X11DRV_GetXScreen() ));
XSetFillStyle( display, physDevDst->gc, FillSolid );
}
XFillRectangle( display, physDevDst->drawable, physDevDst->gc,
......
......@@ -88,6 +88,7 @@ static void X11DRV_PALETTE_ComputeShifts(unsigned long maskbits, int *shift, int
static void X11DRV_PALETTE_FillDefaultColors(void);
static void X11DRV_PALETTE_FormatSystemPalette(void);
static BOOL X11DRV_PALETTE_CheckSysColor(COLORREF c);
static int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col);
/***********************************************************************
* COLOR_Init
......@@ -788,7 +789,7 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
/***********************************************************************
* X11DRV_PALETTE_LookupSystemXPixel
*/
int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col)
static int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col)
{
int i, best = 0, diff = 0x7fffffff;
int size = X11DRV_DevCaps.sizePalette;
......@@ -955,6 +956,9 @@ int X11DRV_PALETTE_UpdateMapping(PALETTEOBJ *palPtr)
{
int i, index, realized = 0;
if (!X11DRV_DevCaps.sizePalette)
return 0;
for( i = 0; i < 20; i++ )
{
index = X11DRV_PALETTE_LookupSystemXPixel(*(COLORREF*)(palPtr->logpalette.palPalEntry + i));
......
......@@ -286,7 +286,6 @@ extern void X11DRV_PALETTE_Cleanup(void);
extern COLORREF X11DRV_PALETTE_ToLogical(int pixel);
extern int X11DRV_PALETTE_ToPhysical(struct tagDC *dc, COLORREF color);
extern int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col);
extern struct tagPALETTE_DRIVER X11DRV_PALETTE_Driver;
......
......@@ -125,6 +125,8 @@ BOOL X11DRV_USER_Initialize(void)
X11DRV_USER_ParseOptions( Options.argc, Options.argv );
X11DRV_USER_Create();
X11DRV_USER_SaveSetup();
return TRUE;
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment