Fixed ugly disabled controls and black background in Write and Lotus

Notes.
This commit is contained in:
Pavel Roskin 1999-04-15 15:52:59 +00:00 committed by Alexandre Julliard
parent 026f705dbc
commit 6f01462b8b
4 changed files with 8 additions and 3 deletions

View File

@ -1293,7 +1293,7 @@ static BOOL BITBLT_InternalStretchBlt( DC *dcDst, INT xDst, INT yDst,
{ {
XSetFunction( display, physDevDst->gc, GXcopy ); XSetFunction( display, physDevDst->gc, GXcopy );
XSetForeground( display, physDevDst->gc, XSetForeground( display, physDevDst->gc,
X11DRV_PALETTE_PaletteToXPixel[X11DRV_DevCaps.sizePalette - 1]); WhitePixelOfScreen( X11DRV_GetXScreen() ));
XSetFillStyle( display, physDevDst->gc, FillSolid ); XSetFillStyle( display, physDevDst->gc, FillSolid );
} }
XFillRectangle( display, physDevDst->drawable, physDevDst->gc, XFillRectangle( display, physDevDst->drawable, physDevDst->gc,

View File

@ -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_FillDefaultColors(void);
static void X11DRV_PALETTE_FormatSystemPalette(void); static void X11DRV_PALETTE_FormatSystemPalette(void);
static BOOL X11DRV_PALETTE_CheckSysColor(COLORREF c); static BOOL X11DRV_PALETTE_CheckSysColor(COLORREF c);
static int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col);
/*********************************************************************** /***********************************************************************
* COLOR_Init * COLOR_Init
@ -788,7 +789,7 @@ int X11DRV_PALETTE_ToPhysical( DC *dc, COLORREF color )
/*********************************************************************** /***********************************************************************
* X11DRV_PALETTE_LookupSystemXPixel * X11DRV_PALETTE_LookupSystemXPixel
*/ */
int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col) static int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col)
{ {
int i, best = 0, diff = 0x7fffffff; int i, best = 0, diff = 0x7fffffff;
int size = X11DRV_DevCaps.sizePalette; int size = X11DRV_DevCaps.sizePalette;
@ -955,6 +956,9 @@ int X11DRV_PALETTE_UpdateMapping(PALETTEOBJ *palPtr)
{ {
int i, index, realized = 0; int i, index, realized = 0;
if (!X11DRV_DevCaps.sizePalette)
return 0;
for( i = 0; i < 20; i++ ) for( i = 0; i < 20; i++ )
{ {
index = X11DRV_PALETTE_LookupSystemXPixel(*(COLORREF*)(palPtr->logpalette.palPalEntry + i)); index = X11DRV_PALETTE_LookupSystemXPixel(*(COLORREF*)(palPtr->logpalette.palPalEntry + i));

View File

@ -286,7 +286,6 @@ extern void X11DRV_PALETTE_Cleanup(void);
extern COLORREF X11DRV_PALETTE_ToLogical(int pixel); extern COLORREF X11DRV_PALETTE_ToLogical(int pixel);
extern int X11DRV_PALETTE_ToPhysical(struct tagDC *dc, COLORREF color); extern int X11DRV_PALETTE_ToPhysical(struct tagDC *dc, COLORREF color);
extern int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col);
extern struct tagPALETTE_DRIVER X11DRV_PALETTE_Driver; extern struct tagPALETTE_DRIVER X11DRV_PALETTE_Driver;

View File

@ -125,6 +125,8 @@ BOOL X11DRV_USER_Initialize(void)
X11DRV_USER_ParseOptions( Options.argc, Options.argv ); X11DRV_USER_ParseOptions( Options.argc, Options.argv );
X11DRV_USER_Create(); X11DRV_USER_Create();
X11DRV_USER_SaveSetup(); X11DRV_USER_SaveSetup();
return TRUE;
} }
/*********************************************************************** /***********************************************************************