Browse Source

Backends: Made SDL3 backend compatible with commit 698dbd8. (#6255, #6146)

Bruno Perković 2 years ago
parent
commit
5320a6ebd3
2 changed files with 4 additions and 2 deletions
  1. 2 1
      backends/imgui_impl_sdl3.cpp
  2. 2 1
      docs/CHANGELOG.txt

+ 2 - 1
backends/imgui_impl_sdl3.cpp

@@ -733,7 +733,8 @@ static void ImGui_ImplSDL3_CreateWindow(ImGuiViewport* viewport)
     sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoTaskBarIcon) ? SDL_WINDOW_SKIP_TASKBAR : 0;
     sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoTaskBarIcon) ? SDL_WINDOW_SKIP_TASKBAR : 0;
 #endif
 #endif
     sdl_flags |= (viewport->Flags & ImGuiViewportFlags_TopMost) ? SDL_WINDOW_ALWAYS_ON_TOP : 0;
     sdl_flags |= (viewport->Flags & ImGuiViewportFlags_TopMost) ? SDL_WINDOW_ALWAYS_ON_TOP : 0;
-    vd->Window = SDL_CreateWindow("No Title Yet", (int)viewport->Pos.x, (int)viewport->Pos.y, (int)viewport->Size.x, (int)viewport->Size.y, sdl_flags);
+    vd->Window = SDL_CreateWindow("No Title Yet", (int)viewport->Size.x, (int)viewport->Size.y, sdl_flags);
+    SDL_SetWindowPosition(vd->Window, (int)viewport->Pos.x, (int)viewport->Pos.y);
     vd->WindowOwned = true;
     vd->WindowOwned = true;
     if (use_opengl)
     if (use_opengl)
     {
     {

+ 2 - 1
docs/CHANGELOG.txt

@@ -114,7 +114,8 @@ Other changes:
 Docking+Viewports Branch:
 Docking+Viewports Branch:
 
 
 - Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
 - Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
-- Backends: GLFW: Fix Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
+- Backends: GLFW: Fixed Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
+- Backends: SDL3: Fixed for compilation with multi-viewports. (#6255) [@P3RK4N]
 
 
 
 
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------