Backends: SDL: Amend 08350e5
, multi-viewports mouse tracking works under Linux. (#4960) + Reword tests to help static analysis.
This commit is contained in:
parent
37958ca1b5
commit
5017602752
@ -370,7 +370,7 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, void* sdl_gl_context)
|
|||||||
io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional)
|
io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional)
|
||||||
|
|
||||||
// SDL on Linux/OSX doesn't report events for unfocused windows (see https://github.com/ocornut/imgui/issues/4960)
|
// SDL on Linux/OSX doesn't report events for unfocused windows (see https://github.com/ocornut/imgui/issues/4960)
|
||||||
#ifdef _WIN32
|
#ifndef __APPLE__
|
||||||
if (mouse_can_use_global_state)
|
if (mouse_can_use_global_state)
|
||||||
io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport;// We can call io.AddMouseViewportEvent() with correct data (optional)
|
io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport;// We can call io.AddMouseViewportEvent() with correct data (optional)
|
||||||
#endif
|
#endif
|
||||||
|
@ -6383,11 +6383,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
BeginDocked(window, p_open);
|
BeginDocked(window, p_open);
|
||||||
flags = window->Flags;
|
flags = window->Flags;
|
||||||
if (window->DockIsActive)
|
if (window->DockIsActive)
|
||||||
|
{
|
||||||
IM_ASSERT(window->DockNode != NULL);
|
IM_ASSERT(window->DockNode != NULL);
|
||||||
|
g.NextWindowData.Flags &= ~ImGuiNextWindowDataFlags_HasSizeConstraint; // Docking currently override constraints
|
||||||
// Docking currently override constraints
|
}
|
||||||
if (window->DockIsActive)
|
|
||||||
g.NextWindowData.Flags &= ~ImGuiNextWindowDataFlags_HasSizeConstraint;
|
|
||||||
|
|
||||||
// Amend the Appearing flag
|
// Amend the Appearing flag
|
||||||
if (window->DockTabIsVisible && !dock_tab_was_visible && dock_node_was_visible && !window->Appearing && !window_was_appearing)
|
if (window->DockTabIsVisible && !dock_tab_was_visible && dock_node_was_visible && !window->Appearing && !window_was_appearing)
|
||||||
|
Loading…
Reference in New Issue
Block a user