Skip to content

Commit

Permalink
macOS: fix titlebar dragging breaking in pluginmode sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Dec 28, 2024
1 parent f6e28f5 commit 680b919
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Components/Buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ class MainToolbarButton final : public TextButton {

// On macOS, we need to make sure that dragging any of these buttons doesn't drag the whole titlebar
#if JUCE_MAC
~MainToolbarButton()
{
if (auto const* topLevel = getTopLevelComponent()) {
if (auto const* peer = topLevel->getPeer()) {
OSUtils::setWindowMovable(peer->getNativeHandle(), true);
}
}
}

void mouseEnter(const MouseEvent& e) override
{
if (auto const* topLevel = getTopLevelComponent()) {
Expand Down

0 comments on commit 680b919

Please sign in to comment.