aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/c/main.cpp b/c/main.cpp
index 5a7ec27..758889f 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -258,20 +258,12 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam,
break;
case 0x02E0: /* WM_DPICHANGED */
{
- const RECT* const r = reinterpret_cast<RECT*>(lParam);
-
- /* 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. */
+ * on the DPI? Do the cached values need to be updated
+ * when the DPI changes? */
+ g_dpi = HIWORD(wParam);
+ const RECT* const r = reinterpret_cast<RECT*>(lParam);
Prefer(SetWindowPos(hWnd, nullptr,
r->left, r->top,
r->right-r->left,
@@ -410,6 +402,8 @@ void HandleMainMenu(const HWND hWnd, const WORD command)
Pl("cfg","set_view_watched",g_bViewWatched);
g_elv->Update();
g_elv->EnsureFocusVisible();
+ /* TODO: Remember last valid focus. In case of
+ * non-existing focus, use the last valid focus. */
break;
case IDM_VIEW_TV_ORIGINAL:
CheckMenuItem(GetMenu(hWnd), IDM_VIEW_TV_ORIGINAL, g_bViewTVOriginal? MF_UNCHECKED: MF_CHECKED);