Skip to content

Commit

Permalink
Backends: Win32: WM_SETTINGCHANGE's SPI_SETWORKAREA message also trig…
Browse files Browse the repository at this point in the history
…gers a refresh of monitor list. (ocornut#8415)
  • Loading branch information
PathogenDavid authored and ocornut committed Feb 21, 2025
1 parent afd659b commit ea59440
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backends/imgui_impl_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
// 2025-02-21: [Docking] WM_SETTINGCHANGE's SPI_SETWORKAREA message also triggers a refresh of monitor list. (#8415)
// 2024-11-21: [Docking] Fixed a crash when multiple processes are running with multi-viewports, caused by misusage of GetProp(). (#8162, #8069)
// 2024-10-28: [Docking] Rely on property stored inside HWND to retrieve context/viewport, should facilitate attempt to use this for parallel contexts. (#8069)
// 2024-09-16: [Docking] Inputs: fixed an issue where a viewport destroyed while clicking would hog mouse tracking and temporary lead to incorrect update of HoveredWindow. (#7971)
Expand Down Expand Up @@ -865,6 +866,10 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandlerEx(HWND hwnd, UINT msg, WPA
case WM_DISPLAYCHANGE:
bd->WantUpdateMonitors = true;
return 0;
case WM_SETTINGCHANGE:
if (wParam == SPI_SETWORKAREA)
bd->WantUpdateMonitors = true;
return 0;
}
return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Docking+Viewports Branch:

- Viewports: fixed an assert when a window load settings with a position outside
monitor bounds, when there are multiple monitors. (#8393, #8385) [@gaborodriguez]
- Backends: Win32: WM_SETTINGCHANGE's SPI_SETWORKAREA message also triggers a refresh
of monitor list, as they contain work area information. (#8415) [@PathogenDavid, @lailoken]


-----------------------------------------------------------------------
Expand Down

0 comments on commit ea59440

Please sign in to comment.