mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Fixed style.DisplaySafeAreaPadding handling from being applied on window that never were auto-fit
This commit is contained in:
parent
468fcd7b30
commit
eb3e640fa6
@ -3103,7 +3103,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
// Clamp into view
|
// Clamp into view
|
||||||
if (!(window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Tooltip))
|
if (!(window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Tooltip))
|
||||||
{
|
{
|
||||||
if (window->AutoFitFrames == 0 && g.IO.DisplaySize.x > 0.0f && g.IO.DisplaySize.y > 0.0f) // Ignore zero-sized display explicitly to avoid losing positions if a window manager reports zero-sized window when initializing or minimizing.
|
if (window->AutoFitFrames <= 0 && g.IO.DisplaySize.x > 0.0f && g.IO.DisplaySize.y > 0.0f) // Ignore zero-sized display explicitly to avoid losing positions if a window manager reports zero-sized window when initializing or minimizing.
|
||||||
{
|
{
|
||||||
ImVec2 clip_min = style.DisplaySafeAreaPadding;
|
ImVec2 clip_min = style.DisplaySafeAreaPadding;
|
||||||
ImVec2 clip_max = g.IO.DisplaySize - style.DisplaySafeAreaPadding;
|
ImVec2 clip_max = g.IO.DisplaySize - style.DisplaySafeAreaPadding;
|
||||||
|
Loading…
Reference in New Issue
Block a user