aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-06 22:36:19 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-06 22:36:19 +0200
commit9ce6c7dadf47737063058adba50e7085faa9fe4a (patch)
treeced6f72edc880ec74c0e8d0406234a68c1a810dd /c/main.cpp
parentc970cc687615f904e66004b6795636fbabb843cb (diff)
downloadEpisodeBrowser-9ce6c7dadf47737063058adba50e7085faa9fe4a.tar.gz
Update cached system metrics on DPI change.
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/c/main.cpp b/c/main.cpp
index 2f668c0..2de5df7 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -262,6 +262,14 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam,
/* Update DPI and cached metrics. */
g_dpi = HIWORD(wParam);
Metric<SM_CXVSCROLL> = GetSystemMetrics(SM_CXVSCROLL);
+ Metric<SM_CXDOUBLECLK> = GetSystemMetrics(SM_CXDOUBLECLK);
+ Metric<SM_CYDOUBLECLK> = GetSystemMetrics(SM_CYDOUBLECLK);
+
+ /* TODO: What does GetSystemMetrics return depending
+ * on the DPI? The documentation says it is not
+ * DPI-aware. Does that mean that Dpi(
+ * GetSystemMetrics(...)) will give the correct value?
+ * If so, the cached values need not be updated. */
Prefer(SetWindowPos(hWnd, nullptr,
r->left, r->top,