Skip to content

Commit

Permalink
fix mouse position bug
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Feb 26, 2024
1 parent 4b452da commit 52bdc48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vstgui/lib/cframe.cpp
Expand Up @@ -667,7 +667,13 @@ void CFrame::dispatchMouseMoveEvent (MouseMoveEvent& event)
if (view->asViewContainer ())
{
if (auto parent = view->getParentView ())
parent->translateToLocal (p, true);
{
if (parent != this)
{
p.offsetInverse (parent->getViewSize ().getTopLeft ());
parent->translateToLocal (p, true);
}
}
}
else
view->translateToLocal (p, true);
Expand Down

0 comments on commit 52bdc48

Please sign in to comment.