From d3cd6a63a0fff7cc77f26b319d61ba256aae680c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 7 Aug 2022 22:22:38 +0200 Subject: Add showtodo script. --- c/main.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'c/main.cpp') 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(lParam); - - /* Update DPI and cached metrics. */ - g_dpi = HIWORD(wParam); - Metric = GetSystemMetrics(SM_CXVSCROLL); - Metric = GetSystemMetrics(SM_CXDOUBLECLK); - Metric = 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(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); -- cgit v1.2.3