Skip to content

Commit

Permalink
Backends: SDL3: secondary viewports SDL_WindowFlags only inherit SDL_…
Browse files Browse the repository at this point in the history
…WINDOW_HIGH_PIXEL_DENSITY from the main window. (#8098, #2306)

Amend a526ff8 (#6146)
  • Loading branch information
SuperRonan authored and ocornut committed Oct 24, 2024
1 parent c71e4e8 commit 943e26b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backends/imgui_impl_sdl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,9 @@ static void ImGui_ImplSDL3_CreateWindow(ImGuiViewport* viewport)
SDL_GL_MakeCurrent(main_viewport_data->Window, main_viewport_data->GLContext);
}

Uint32 sdl_flags = 0;
SDL_WindowFlags sdl_flags = 0;
sdl_flags |= use_opengl ? SDL_WINDOW_OPENGL : (bd->UseVulkan ? SDL_WINDOW_VULKAN : 0);
sdl_flags |= SDL_GetWindowFlags(bd->Window);
sdl_flags |= SDL_GetWindowFlags(bd->Window) & SDL_WINDOW_HIGH_PIXEL_DENSITY;
sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoDecoration) ? SDL_WINDOW_BORDERLESS : 0;
sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoDecoration) ? 0 : SDL_WINDOW_RESIZABLE;
sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoTaskBarIcon) ? SDL_WINDOW_UTILITY : 0;
Expand Down

0 comments on commit 943e26b

Please sign in to comment.