Skip to content

Commit

Permalink
fix(nui/core): send mouseUp
Browse files Browse the repository at this point in the history
Regression caused by: 61eccbe. The
mouse release event is required - just need to ensure the click-count is
non-zero.
  • Loading branch information
gottfriedleibniz committed May 6, 2024
1 parent 9f2ea4c commit ea8e1a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/components/nui-core/src/CefInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,13 @@ static HookFunction initFunction([] ()

auto browser = GetFocusBrowser();

if (browser && lastClickCount > 0)
if (browser)
{
CefMouseEvent mouse_event;
mouse_event.x = x;
mouse_event.y = y;
mouse_event.modifiers = GetCefMouseModifiers();
browser->GetHost()->SendMouseClickEvent(mouse_event, btnType, true, lastClickCount);
browser->GetHost()->SendMouseClickEvent(mouse_event, btnType, true, std::max(1, lastClickCount));
}
}
}
Expand Down

0 comments on commit ea8e1a4

Please sign in to comment.