Pārlūkot izejas kodu

Backends: Win32: WM_SETTINGCHANGE's SPI_SETWORKAREA message also triggers a refresh of monitor list. (#8415)

David Maas 6 mēneši atpakaļ
vecāks
revīzija
ea59440662
2 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 5 0
      backends/imgui_impl_win32.cpp
  2. 2 0
      docs/CHANGELOG.txt

+ 5 - 0
backends/imgui_impl_win32.cpp

@@ -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)
@@ -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;
 }

+ 2 - 0
docs/CHANGELOG.txt

@@ -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]
 
 
 -----------------------------------------------------------------------