Windows: clicking on a window's empty-space to move/focus a window checks for lack of queued focus request. (#9382)
This commit is contained in:
@@ -47,6 +47,8 @@ Other Changes:
|
|||||||
- Clicking on a window's empty-space to move/focus a window checks
|
- Clicking on a window's empty-space to move/focus a window checks
|
||||||
for lack of mouse button ownership. This gives an additional opportunity
|
for lack of mouse button ownership. This gives an additional opportunity
|
||||||
for user code to bypass it without using a clickable item. (#9382)
|
for user code to bypass it without using a clickable item. (#9382)
|
||||||
|
- Clicking on a window's empty-space to move/focus a window checks
|
||||||
|
for lack of queued focus request. (#9382)
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|||||||
@@ -5363,8 +5363,9 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
|
|||||||
// If we try to focus it, FocusWindow() > ClosePopupsOverWindow() will accidentally close any parent popups because they are not linked together any more.
|
// If we try to focus it, FocusWindow() > ClosePopupsOverWindow() will accidentally close any parent popups because they are not linked together any more.
|
||||||
ImGuiWindow* hovered_root = hovered_window ? hovered_window->RootWindow : NULL;
|
ImGuiWindow* hovered_root = hovered_window ? hovered_window->RootWindow : NULL;
|
||||||
const bool is_closed_popup = hovered_root && (hovered_root->Flags & ImGuiWindowFlags_Popup) && !IsPopupOpen(hovered_root->PopupId, ImGuiPopupFlags_AnyPopupLevel);
|
const bool is_closed_popup = hovered_root && (hovered_root->Flags & ImGuiWindowFlags_Popup) && !IsPopupOpen(hovered_root->PopupId, ImGuiPopupFlags_AnyPopupLevel);
|
||||||
|
const bool is_queued_focus_request = g.NavMoveSubmitted && (g.NavMoveFlags & ImGuiNavMoveFlags_FocusApi);
|
||||||
|
|
||||||
if (hovered_window != NULL && !is_closed_popup)
|
if (hovered_window != NULL && !is_closed_popup && !is_queued_focus_request)
|
||||||
{
|
{
|
||||||
StartMouseMovingWindow(hovered_window); //-V595
|
StartMouseMovingWindow(hovered_window); //-V595
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user