Skip to content

Commit ddd7e2a

Browse files
committed
When exiting the root element, existing hover outlines should clear. Resolves #104.
1 parent 65a1c2e commit ddd7e2a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

melatonin/helpers/overlay_mouse_listener.h

+5
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ namespace melatonin
9090
{
9191
if (event.originalComponent == root)
9292
{
93+
// TODO: Sudara is wondering if this callback is needed...
9394
mouseExitCallback();
9495
}
96+
97+
// not sure if there's a better way to ask "is the mouse outside the plugin now?"
98+
if (!root->contains(event.getEventRelativeTo(root).position))
99+
outlineComponentCallback (nullptr);
95100
}
96101

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

0 commit comments

Comments
 (0)