summaryrefslogtreecommitdiff
path: root/alf/alflayout.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-01 12:03:57 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-01 12:03:57 +0200
commitdb6974eda1dc1fada95af97ea53c369db58fda41 (patch)
treee9ab96b1b8020e490f2e8d54757e1f1988d69f22 /alf/alflayout.cpp
parent79e8eb033fd2742b67966f5ff973f4ef64005531 (diff)
replace windows version checks with compat bits
this saves us from calling GetVersion() and massaging the result in hot code paths
Diffstat (limited to 'alf/alflayout.cpp')
-rw-r--r--alf/alflayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/alf/alflayout.cpp b/alf/alflayout.cpp
index 6f35345..745b303 100644
--- a/alf/alflayout.cpp
+++ b/alf/alflayout.cpp
@@ -231,7 +231,7 @@ ALF_Layout_CalcCheckboxSize(HWND hwndWindow, ALFLayout *layout, HWND hwndCheckbo
int checkwidth = 12 * layout->dpi / 96 + 1;
int checkheight = checkwidth;
- if (!ALF_Compat_IsMinWindowsVersion(4, 0)) {
+ if (!ALF_Compat_Is40()) {
// 3.x-style checkboxes have the checkmark baseline-aligned
TEXTMETRIC tm;
ZeroMemory(&tm, sizeof(tm));
@@ -624,7 +624,7 @@ ALF_Layout_Apply(ALFLayout* layout, HWND window)
UINT flags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER;
// NT 3.51 and Win32s have so many invalidation bugs it's not even funny
- if (!ALF_Compat_IsMinWindowsVersion(4, 0))
+ if (!ALF_Compat_Is40())
flags |= SWP_NOCOPYBITS;
// transparent background: invalidate if control moved