mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Explicitly release focus when clicking on non-imgui
This commit is contained in:
parent
2fbccb2e95
commit
9f31ba7177
1 changed files with 5 additions and 3 deletions
|
|
@ -245,6 +245,9 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
|
|||
return default(LRESULT);
|
||||
}
|
||||
|
||||
if (ImGui.IsAnyItemActive())
|
||||
ImGui.ClearWindowFocus();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -531,7 +534,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
|
|||
|
||||
// We still want to return MA_NOACTIVATE
|
||||
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mouseactivate
|
||||
return 0x3;
|
||||
return MA.MA_NOACTIVATE;
|
||||
case WM.WM_NCHITTEST:
|
||||
// Let mouse pass-through the window. This will allow the backend to set io.MouseHoveredViewport properly (which is OPTIONAL).
|
||||
// The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging.
|
||||
|
|
@ -539,8 +542,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler
|
|||
// your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system.
|
||||
if (viewport.Flags.HasFlag(ImGuiViewportFlags.NoInputs))
|
||||
{
|
||||
// https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest
|
||||
return -1;
|
||||
return HTTRANSPARENT;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue