Added the hollow brush to the list of static data initialized by uiinit() in the Windows backend; this lets other parts of the package use the hollow brush without the need for additional error checking.

This commit is contained in:
Pietro Gagliardi 2014-08-05 16:30:12 -04:00
parent c6674d1e9e
commit c460c11b65
2 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,8 @@ HFONT smallTitleFont;
HFONT menubarFont;
HFONT statusbarFont;
HBRUSH hollowBrush;
DWORD initWindows(char **errmsg)
{
STARTUPINFOW si;
@ -61,5 +63,11 @@ DWORD initWindows(char **errmsg)
GETFONT(menubarFont, lfMenuFont, "menu bar");
GETFONT(statusbarFont, lfStatusFont, "status bar");
hollowBrush = GetStockObject(HOLLOW_BRUSH);
if (hollowBrush == NULL) {
*errmsg = "error getting hollow brush";
return GetLastError();
}
return 0;
}

View File

@ -65,6 +65,7 @@ extern HFONT titleFont;
extern HFONT smallTitleFont;
extern HFONT menubarFont;
extern HFONT statusbarFont;
extern HBRUSH hollowBrush;
extern DWORD initWindows(char **);
/* sizing_windows.c */