We avoid modifying window controls in modal situations if possible.
Doing as much as [window setStyleMask: [window styleMask]]; for a
PopupMenu window will make it invisible on MacOS when the plugin is
hosted in an external subprocess.
This fixes a regression caused by
fb14118771.
viewDidDisappear may be called when a file is successfully selected.
presentationControllerDidDismiss is only called when the controller is
dismissed manually by the user, e.g. by tapping outside the sheet, or by
dragging it away.
Checking for sheet dismissal is necessary in iOS 15, but not in iOS 17.
In iOS 17, tapping outside the file chooser causes a callback to
documentPickerWasCancelled instead.
While Google Drive seemingly isn't trying to access URI's that aren't an
exact match, without the presence of FLAG_GRANT_PREFIX_URI_PERMISSION,
sharing files with Google Drive will silently fail.
This fixes a bug, where VoiceOver would interact with the InnerNSView in
the AudioPluginHost. Instead the focus now jumps from the minimise
button directly to the plugin's first accessible element.
On MacOS the rule is: when returning accessibilityChildren an ignored
child must be replaced with its own children. When returning the
accessibilityParent, an ignored element must be replaced with its own
parent.
This patch should resolve an issue introduced in
0ab30555fc where arrow keys and other
directional keys (home, end, page up, page down) stopped working as
expected.
With this patch in place,
- IME input in plugins should work correctly, including for languages
with a selection palette (Japanese) and languages where multiple
keypresses combine to a single character (Korean).
- Keyboard shortcuts should work (cut, copy, paste)
- Directional keys should work
Running under Gnome, calling ComponentPeer::forceSetBounds immediately
after creating a new peer causes the peer to emit a visibility-changed
event because the window manager sometimes reports that the new window
is in IconicState.
_NET_WM_STATE_HIDDEN seems to more accurately reflect whether the window
is really minimised or off-screen.
Previously, the top-level modal dismiss broadcaster would attempt to
dismiss all modals when the native file chooser was brought to the front
or clicked. This would end up calling Component::inputAttemptWhenModal,
which would bring the FileChooser's Component to the front, interrupting
the mouse click.
The fix is to avoid bringing the plugin window to the front when the
FileChooser is in a modal state. As the chooser is a native window, the
system should take care of enforcing the expected modal behaviour.
It's not clear why this issue only affects Cantabile. It seems that in
Cantabile, events from the native FileChooser get sent to the plugin
editor's parent HWND, whereas this doesn't happen in other hosts.
Perhaps Cantabile is hooking/intercepting window messages in some way.