Browse Source

VST(3) Host: Use standard (non-flipped) coordinate space for plugin editors

This change fixes an issue where UAD VST2 plugins would incorrectly draw
a menu at the top, rather than at the bottom, of the editor view.
pull/22/head
reuk 3 years ago
parent
commit
a5b55ab902
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      modules/juce_audio_processors/juce_audio_processors.cpp

+ 5
- 10
modules/juce_audio_processors/juce_audio_processors.cpp View File

@@ -155,21 +155,19 @@ private:
}
}
struct FlippedNSView : public ObjCClass<NSView>
struct InnerNSView : public ObjCClass<NSView>
{
FlippedNSView()
: ObjCClass ("JuceFlippedNSView_")
InnerNSView()
: ObjCClass ("JuceInnerNSView_")
{
addIvar<NSViewComponentWithParent*> ("owner");
addMethod (@selector (isFlipped), isFlipped);
addMethod (@selector (isOpaque), isOpaque);
addMethod (@selector (didAddSubview:), didAddSubview);
registerClass();
}
static BOOL isFlipped (id, SEL) { return YES; }
static BOOL isOpaque (id, SEL) { return YES; }
static void nudge (id self)
@@ -179,15 +177,12 @@ private:
owner->triggerAsyncUpdate();
}
static void viewDidUnhide (id self, SEL) { nudge (self); }
static void didAddSubview (id self, SEL, NSView*) { nudge (self); }
static void viewDidMoveToSuperview (id self, SEL) { nudge (self); }
static void viewDidMoveToWindow (id self, SEL) { nudge (self); }
};
static FlippedNSView& getViewClass()
static InnerNSView& getViewClass()
{
static FlippedNSView result;
static InnerNSView result;
return result;
}
};


Loading…
Cancel
Save