comctl32/trackbar: Remove separate field indicating focused state.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2018-05-05 19:18:59 +03:00 committed by Alexandre Julliard
parent 6dc3c6ba87
commit 2e9b17922e
1 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,6 @@ typedef struct
INT fLocation; INT fLocation;
DWORD flags; DWORD flags;
BOOL bUnicode; BOOL bUnicode;
BOOL bFocussed;
RECT rcChannel; RECT rcChannel;
RECT rcSelection; RECT rcSelection;
RECT rcThumb; RECT rcThumb;
@ -90,6 +89,7 @@ typedef struct
/* Page was set with TBM_SETPAGESIZE */ /* Page was set with TBM_SETPAGESIZE */
#define TB_USER_PAGE 0x00000080 #define TB_USER_PAGE 0x00000080
#define TB_IS_FOCUSED 0x00000100
/* helper defines for TRACKBAR_DrawTic */ /* helper defines for TRACKBAR_DrawTic */
#define TIC_EDGE 0x20 #define TIC_EDGE 0x20
@ -999,7 +999,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
} }
/* draw focus rectangle */ /* draw focus rectangle */
if (infoPtr->bFocussed) { if (infoPtr->flags & TB_IS_FOCUSED) {
DrawFocusRect(hdc, &rcClient); DrawFocusRect(hdc, &rcClient);
} }
@ -1570,7 +1570,7 @@ static LRESULT
TRACKBAR_KillFocus (TRACKBAR_INFO *infoPtr) TRACKBAR_KillFocus (TRACKBAR_INFO *infoPtr)
{ {
TRACE("\n"); TRACE("\n");
infoPtr->bFocussed = FALSE; infoPtr->flags &= ~TB_IS_FOCUSED;
TRACKBAR_InvalidateAll(infoPtr); TRACKBAR_InvalidateAll(infoPtr);
return 0; return 0;
@ -1657,7 +1657,7 @@ static LRESULT
TRACKBAR_SetFocus (TRACKBAR_INFO *infoPtr) TRACKBAR_SetFocus (TRACKBAR_INFO *infoPtr)
{ {
TRACE("\n"); TRACE("\n");
infoPtr->bFocussed = TRUE; infoPtr->flags |= TB_IS_FOCUSED;
TRACKBAR_InvalidateAll(infoPtr); TRACKBAR_InvalidateAll(infoPtr);
return 0; return 0;