Skip to content

Commit

Permalink
When exiting the root element, existing hover outlines should clear. R…
Browse files Browse the repository at this point in the history
…esolves #104.
  • Loading branch information
sudara committed Mar 19, 2024
1 parent 65a1c2e commit ddd7e2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions melatonin/helpers/overlay_mouse_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ namespace melatonin
{
if (event.originalComponent == root)
{
// TODO: Sudara is wondering if this callback is needed...
mouseExitCallback();
}

// not sure if there's a better way to ask "is the mouse outside the plugin now?"
if (!root->contains(event.getEventRelativeTo(root).position))
outlineComponentCallback (nullptr);
}

std::function<void (juce::Component* c)> outlineComponentCallback;
Expand Down

0 comments on commit ddd7e2a

Please sign in to comment.