summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-05 16:30:12 -0400
committerPietro Gagliardi <[email protected]>2014-08-05 16:30:12 -0400
commitc460c11b657a1ff243cf13b96a0fada63a7feee7 (patch)
treed7004f6279b77a87a07ad698f79a2124f2230c76
parentc6674d1e9e5d3b75328e722b5f1100a479081150 (diff)
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.
-rw-r--r--redo/init_windows.c8
-rw-r--r--redo/winapi_windows.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/redo/init_windows.c b/redo/init_windows.c
index 343b9d4..cc04fb7 100644
--- a/redo/init_windows.c
+++ b/redo/init_windows.c
@@ -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;
}
diff --git a/redo/winapi_windows.h b/redo/winapi_windows.h
index ebbb58a..9f67f95 100644
--- a/redo/winapi_windows.h
+++ b/redo/winapi_windows.h
@@ -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 */