Skip to content

Commit 78fca7d

Browse files
committed
Fix windowing regression on Linux caused by iOS fix
1 parent 5422103 commit 78fca7d

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Source/Components/ObjectDragAndDrop.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ class ObjectClickAndDrop final : public Component
102102
objectString = target->getObjectString();
103103
objectName = target->getPatchStringName();
104104

105+
#if JUCE_IOS
105106
addToDesktop(ComponentPeer::windowIsTemporary, editor->getPeer()->getNativeHandle());
106-
107+
#else
108+
addToDesktop(ComponentPeer::windowIsTemporary);
109+
#endif
110+
107111
setAlwaysOnTop(true);
108112

109113
// FIXME: we should only ask a new mask image when the theme has changed so it's the correct colour

Source/PluginEditor.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,11 @@ CallOutBox& PluginEditor::showCalloutBox(std::unique_ptr<Component> content, Rec
552552

553553
if (ProjectInfo::canUseSemiTransparentWindows()) {
554554
content->addComponentListener(new CalloutDeletionListener(this));
555+
#if JUCE_IOS
555556
calloutArea->addToDesktop(ComponentPeer::windowIsTemporary, getPeer()->getNativeHandle());
557+
#else
558+
calloutArea->addToDesktop(ComponentPeer::windowIsTemporary);
559+
#endif
556560
calloutArea->toFront(true);
557561
auto const bounds = calloutArea->getLocalArea(nullptr, screenBounds);
558562
return CallOutBox::launchAsynchronously(std::move(content), bounds, calloutArea.get());
@@ -1063,7 +1067,12 @@ void PluginEditor::showCalloutArea(bool shouldBeVisible)
10631067
{
10641068
if(shouldBeVisible)
10651069
{
1070+
#if JUCE_IOS
10661071
calloutArea->addToDesktop(ComponentPeer::windowIsTemporary, getPeer()->getNativeHandle());
1072+
#else
1073+
calloutArea->addToDesktop(ComponentPeer::windowIsTemporary);
1074+
#endif
1075+
10671076
}
10681077
else {
10691078
calloutArea->removeFromDesktop();

Source/Utility/StackDropShadower.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,13 @@ class StackDropShadower final : private ComponentListener {
215215
#endif
216216

217217
setSize(1, 1); // to keep the OS happy by not having zero-size windows
218+
#if JUCE_IOS
219+
addToDesktop(ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresMouseClicks
220+
| ComponentPeer::windowIgnoresKeyPresses);
221+
#else
218222
addToDesktop(ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresMouseClicks
219223
| ComponentPeer::windowIgnoresKeyPresses, comp->getPeer()->getNativeHandle());
224+
#endif
220225
} else if (Component* const parent = comp->getParentComponent()) {
221226
parent->addChildComponent(this);
222227
}

Source/Utility/ZoomableDragAndDropContainer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,12 @@ void ZoomableDragAndDropContainer::startDragging(var const& sourceDescription,
558558
if (!Desktop::canUseSemiTransparentWindows()) {
559559
dragImageComponent->setOpaque(true);
560560
}
561-
561+
auto* parentPeer = sourceComponent->getTopLevelComponent()->getPeer();
562+
#if JUCE_IOS
563+
dragImageComponent->addToDesktop(ComponentPeer::windowIgnoresMouseClicks | ComponentPeer::windowIsTemporary, parentPeer->getNativeHandle());
564+
#else
562565
dragImageComponent->addToDesktop(ComponentPeer::windowIgnoresMouseClicks | ComponentPeer::windowIsTemporary);
566+
#endif
563567

564568
dragImageComponent->sourceDetails.localPosition = sourceComponent->getLocalPoint(nullptr, lastMouseDown).toInt();
565569
dragImageComponent->updateLocation(false, lastMouseDown.toInt());

0 commit comments

Comments
 (0)