|
@@ -24,6 +24,7 @@
|
|
// CHANGELOG
|
|
// CHANGELOG
|
|
// (minor and older changes stripped away, please see git history for details)
|
|
// (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-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
|
|
|
+// 2025-02-25: [Docking] Revert to use SDL_GetDisplayBounds() for WorkPos/WorkRect if SDL_GetDisplayUsableBounds() failed.
|
|
// 2025-02-21: [Docking] Update monitors and work areas information every frame, as the later may change regardless of monitor changes. (#8415)
|
|
// 2025-02-21: [Docking] Update monitors and work areas information every frame, as the later may change regardless of monitor changes. (#8415)
|
|
// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
|
|
// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
|
|
// 2025-02-10: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn handler.
|
|
// 2025-02-10: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn handler.
|
|
@@ -832,9 +833,11 @@ static void ImGui_ImplSDL3_UpdateMonitors()
|
|
SDL_GetDisplayBounds(display_id, &r);
|
|
SDL_GetDisplayBounds(display_id, &r);
|
|
monitor.MainPos = monitor.WorkPos = ImVec2((float)r.x, (float)r.y);
|
|
monitor.MainPos = monitor.WorkPos = ImVec2((float)r.x, (float)r.y);
|
|
monitor.MainSize = monitor.WorkSize = ImVec2((float)r.w, (float)r.h);
|
|
monitor.MainSize = monitor.WorkSize = ImVec2((float)r.w, (float)r.h);
|
|
- SDL_GetDisplayUsableBounds(display_id, &r);
|
|
|
|
- monitor.WorkPos = ImVec2((float)r.x, (float)r.y);
|
|
|
|
- monitor.WorkSize = ImVec2((float)r.w, (float)r.h);
|
|
|
|
|
|
+ if (SDL_GetDisplayUsableBounds(display_id, &r) && r.w > 0 && r.h > 0)
|
|
|
|
+ {
|
|
|
|
+ monitor.WorkPos = ImVec2((float)r.x, (float)r.y);
|
|
|
|
+ monitor.WorkSize = ImVec2((float)r.w, (float)r.h);
|
|
|
|
+ }
|
|
// FIXME-VIEWPORT: On MacOS SDL reports actual monitor DPI scale, ignoring OS configuration. We may want to set
|
|
// FIXME-VIEWPORT: On MacOS SDL reports actual monitor DPI scale, ignoring OS configuration. We may want to set
|
|
// DpiScale to cocoa_window.backingScaleFactor here.
|
|
// DpiScale to cocoa_window.backingScaleFactor here.
|
|
monitor.DpiScale = SDL_GetDisplayContentScale(display_id);
|
|
monitor.DpiScale = SDL_GetDisplayContentScale(display_id);
|