File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -259,9 +259,16 @@ void Window::mouseUp(const ImGuiMouseButton btn)
259
259
260
260
if (Platform::getCapture () == m_hwnd && m_mouseDown == 0 )
261
261
Platform::releaseCapture ();
262
+
263
+ // Clear NoInputs early to avoid sub-frame double-clicks reaching the window
264
+ // under only if that window is not one of ours (MouseHoveredViewport) to
265
+ // still allow for drag-docking.
262
266
if (btn == ImGuiMouseButton_Left && m_ctx->imgui ()->MovingWindow &&
263
- m_ctx->imgui ()->MovingWindow ->Viewport == m_viewport)
267
+ m_ctx->imgui ()->MovingWindow ->Viewport == m_viewport &&
268
+ !m_ctx->IO ().MouseHoveredViewport ) {
264
269
m_viewport->Flags &= ~ImGuiViewportFlags_NoInputs;
270
+ update (); // for the macOS backend to clear NSWindow's ignoresMouseEvents
271
+ }
265
272
}
266
273
267
274
void Window::releaseMouse ()
You can’t perform that action at this time.
0 commit comments