diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index ab5d448239f..ea790bdda78 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -815,6 +815,13 @@ typedef struct tagDPISERVERINFO UINT wMaxBtnSize; /* 014 */ } DPISERVERINFO, *PDPISERVERINFO; +// PUSIFlags: +#define PUSIF_PALETTEDISPLAY 0x01 +#define PUSIF_SNAPTO 0x02 +#define PUSIF_COMBOBOXANIMATION 0x04 +#define PUSIF_LISTBOXSMOOTHSCROLLING 0x08 +#define PUSIF_KEYBOARDCUES 0x20 + typedef struct _PERUSERSERVERINFO { INT aiSysMet[SM_CMETRICS]; diff --git a/reactos/subsystems/win32/win32k/ntuser/focus.c b/reactos/subsystems/win32/win32k/ntuser/focus.c index 1ae24a8fd66..d4e26400c62 100644 --- a/reactos/subsystems/win32/win32k/ntuser/focus.c +++ b/reactos/subsystems/win32/win32k/ntuser/focus.c @@ -63,7 +63,8 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate) if (WindowPrev) UserRefObjectCo(WindowPrev, &RefPrev); /* Send palette messages */ - if (co_IntPostOrSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0)) + if (gpsi->PUSIFlags & PUSIF_PALETTEDISPLAY && + co_IntPostOrSendMessage(hWnd, WM_QUERYNEWPALETTE, 0, 0)) { UserSendNotifyMessage( HWND_BROADCAST, WM_PALETTEISCHANGING, diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index d6029f7e1ad..22dbff14b14 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -306,6 +306,12 @@ co_IntInitializeDesktopGraphics(VOID) gpsi->BitsPixel = NtGdiGetDeviceCaps(ScreenDeviceContext, BITSPIXEL); gpsi->BitCount = gpsi->Planes * gpsi->BitsPixel; gpsi->dmLogPixels = NtGdiGetDeviceCaps(ScreenDeviceContext, LOGPIXELSY); + if (NtGdiGetDeviceCaps(ScreenDeviceContext, RASTERCAPS) & RC_PALETTE) + { + gpsi->PUSIFlags |= PUSIF_PALETTEDISPLAY; + } + else + gpsi->PUSIFlags &= ~PUSIF_PALETTEDISPLAY; // Font is realized and this dc was previously set to internal DC_ATTR. gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw, (DWORD*)&gpsi->cySysFontChar); gpsi->tmSysFont = tmw;