[0.4.9][WIN32SS] Fix Mask for Draw Frame States CORE-8808

Fixes drawing of caption bar buttons (min/max/close in Mozilla Firefox titlebar when its menubar is disabled).
See CORE-8808.

The fix is a partial port of 0.4.14-dev-1314-g acf135d16d
I left out all changes to the logging and took only the essence of this patch.
This commit is contained in:
Joachim Henze 2022-01-30 22:50:18 +01:00
parent 4ab44d7a80
commit c48df9a9f5
2 changed files with 12 additions and 12 deletions

View file

@ -757,7 +757,7 @@ BOOL FASTCALL UITOOLS95_DFC_ButtonCheckRadio(HDC dc, LPRECT r, UINT uFlags, BOOL
/* Ported from WINE20020904 */
BOOL FASTCALL UITOOLS95_DrawFrameButton(HDC hdc, LPRECT rc, UINT uState)
{
switch(uState & 0xff)
switch(uState & 0x1f)
{
case DFCS_BUTTONPUSH:
return UITOOLS95_DFC_ButtonPush(hdc, rc, uState);
@ -787,7 +787,7 @@ BOOL FASTCALL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT bkmode;
WCHAR Symbol;
switch(uFlags & 0xff)
switch(uFlags & 0xf)
{
case DFCS_CAPTIONCLOSE:
Symbol = 'r';
@ -853,7 +853,7 @@ BOOL FASTCALL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT bkmode;
WCHAR Symbol;
switch(uFlags & 0xff)
switch(uFlags & 0x1f)
{
case DFCS_SCROLLCOMBOBOX:
case DFCS_SCROLLDOWN:
@ -956,7 +956,7 @@ BOOL FASTCALL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT cxy;
cxy = UITOOLS_MakeSquareRect(r, &myr);
switch(uFlags & 0xff)
switch(uFlags & 0x1f)
{
case DFCS_MENUARROWUP:
Symbol = '5';
@ -999,8 +999,8 @@ BOOL FASTCALL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
/* save font */
hOldFont = NtGdiSelectFont(dc, hFont);
if ((uFlags & 0xff) == DFCS_MENUARROWUP ||
(uFlags & 0xff) == DFCS_MENUARROWDOWN )
if ((uFlags & 0x1f) == DFCS_MENUARROWUP ||
(uFlags & 0x1f) == DFCS_MENUARROWDOWN )
{
#if 0
if (uFlags & DFCS_INACTIVE)

View file

@ -777,7 +777,7 @@ static BOOL UITOOLS95_DFC_ButtonCheckRadio(HDC dc, LPRECT r, UINT uFlags, BOOL R
/* Ported from WINE20020904 */
static BOOL UITOOLS95_DrawFrameButton(HDC hdc, LPRECT rc, UINT uState)
{
switch(uState & 0xff)
switch(uState & 0x1f)
{
case DFCS_BUTTONPUSH:
return UITOOLS95_DFC_ButtonPush(hdc, rc, uState);
@ -808,7 +808,7 @@ static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT bkmode;
TCHAR Symbol;
switch(uFlags & 0xff)
switch(uFlags & 0xf)
{
case DFCS_CAPTIONCLOSE:
Symbol = 'r';
@ -875,7 +875,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT bkmode;
TCHAR Symbol;
switch(uFlags & 0xff)
switch(uFlags & 0x1f)
{
case DFCS_SCROLLCOMBOBOX:
case DFCS_SCROLLDOWN:
@ -979,7 +979,7 @@ static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
RECT myr;
INT cxy;
cxy = UITOOLS_MakeSquareRect(r, &myr);
switch(uFlags & 0xff)
switch(uFlags & 0x1f)
{
case DFCS_MENUARROWUP:
Symbol = '5';
@ -1020,8 +1020,8 @@ static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
/* save font */
hOldFont = SelectObject(dc, hFont);
if ((uFlags & 0xff) == DFCS_MENUARROWUP ||
(uFlags & 0xff) == DFCS_MENUARROWDOWN )
if ((uFlags & 0x1f) == DFCS_MENUARROWUP ||
(uFlags & 0x1f) == DFCS_MENUARROWDOWN )
{
#if 0
if (uFlags & DFCS_INACTIVE)