diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-07 22:22:38 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-07 22:22:38 +0200 |
commit | d3cd6a63a0fff7cc77f26b319d61ba256aae680c (patch) | |
tree | f030663ee7085aa5609a64c5ec9ea2faa9be6aaa /c | |
parent | e2d0b92ffc536c3d34ee751ba688946613bc5693 (diff) | |
download | EpisodeBrowser-d3cd6a63a0fff7cc77f26b319d61ba256aae680c.tar.gz |
Add showtodo script.
Diffstat (limited to 'c')
-rw-r--r-- | c/main.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -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); |