mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
iOS: Always assume that your main view is in focus if you are running as an app extension
This commit is contained in:
parent
97fdc233e6
commit
b1b5c7bf23
1 changed files with 6 additions and 2 deletions
|
|
@ -216,7 +216,7 @@ public:
|
|||
UIWindow* window;
|
||||
JuceUIView* view;
|
||||
JuceUIViewController* controller;
|
||||
bool isSharedWindow, fullScreen, insideDrawRect;
|
||||
bool isSharedWindow, fullScreen, insideDrawRect, isAppex;
|
||||
static ModifierKeys currentModifiers;
|
||||
|
||||
static int64 getMouseTime (UIEvent* e) noexcept
|
||||
|
|
@ -555,7 +555,8 @@ UIViewComponentPeer::UIViewComponentPeer (Component& comp, const int windowStyle
|
|||
controller (nil),
|
||||
isSharedWindow (viewToAttachTo != nil),
|
||||
fullScreen (false),
|
||||
insideDrawRect (false)
|
||||
insideDrawRect (false),
|
||||
isAppex (SystemStats::isRunningInAppExtensionSandbox())
|
||||
{
|
||||
CGRect r = convertToCGRect (component.getBounds());
|
||||
|
||||
|
|
@ -922,6 +923,9 @@ void UIViewComponentPeer::viewFocusLoss()
|
|||
|
||||
bool UIViewComponentPeer::isFocused() const
|
||||
{
|
||||
if (isAppex)
|
||||
return true;
|
||||
|
||||
return isSharedWindow ? this == currentlyFocusedPeer
|
||||
: (window != nil && [window isKeyWindow]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue