Browse Source

Windows: Fixed a focus ping-pong issue in the native file chooser when using a custom component

tags/2021-05-28
ed 6 years ago
parent
commit
fdc77e645d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_gui_basics/native/juce_win32_FileChooser.cpp

+ 5
- 0
modules/juce_gui_basics/native/juce_win32_FileChooser.cpp View File

@@ -120,6 +120,8 @@ public:
EndDialog (hwnd, 0);
}
Component* getCustomComponent() { return customComponent.get(); }
Array<URL> results;
private:
@@ -567,6 +569,9 @@ public:
if (targetComponent == nullptr)
return false;
if (targetComponent == nativeFileChooser->getCustomComponent())
return true;
return targetComponent->findParentComponentOfClass<FilePreviewComponent>() != nullptr;
}


Loading…
Cancel
Save