1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00
Commit graph

1282 commits

Author SHA1 Message Date
reuk
c13276a4d6
Windows: Allow IME input in plugins 2023-05-31 15:15:26 +01:00
reuk
dae9567dca
WindowsHooks: Split declarations and definitions into seaprate files 2023-05-31 15:15:25 +01:00
reuk
7ed89e4896
WindowsHooks: Move into juce_gui_basics 2023-05-31 15:15:25 +01:00
reuk
4ba81fda59
FileChooser: Fix bug where native FileChooser could not be closed when hosted in Cantabile
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.
2023-05-31 15:15:25 +01:00
reuk
910c60b84a
FileChooser: Avoid passing deprecated --confirm-overwrite option to zenity 2023-05-31 15:15:25 +01:00
reuk
fa6f5a889a
NSViewComponentPeer: Avoid calling makeKeyWindow on windows that cannot become key 2023-05-31 15:15:24 +01:00
reuk
cf7c865432
NSViewComponentPeer: Ensure inner views that receive key equivalents reset keyDown state correctly 2023-05-31 15:15:24 +01:00
Anthony Nicholls
f5cd9547dd Tidy divider comments 2023-05-26 09:04:21 +01:00
reuk
53bfd5b16d
WindowUtils: Make areThereAnyAlwaysOnTopWindows() public 2023-05-04 18:42:41 +01:00
reuk
ad59f71b99
Android: Fix version checks around setImeConsumesInput() 2023-05-04 18:41:04 +01:00
attila
73459411ba Android: Fix accessibility on newer Android versions
This commit fixes a bug where a View would be registered as it's own
parent in the accessibility hierarchy leading to stack overflows in the
Android accessibility service. The issue affected up-to-date Android 13
systems and potentially older systems with updated accessibility
services.
2023-04-25 16:28:11 +02:00
reuk
1de392bbab
CGMetalLayerRenderer: Avoid creating resources for zero-size layers 2023-04-19 19:59:49 +01:00
reuk
70d99d1cc4
NSViewComponentPeer: Fix occasional rendering artefacts
When clearing deferredRepaints in drawRect, dirty regions in the 'next'
frame could be incorrectly removed while drawing the 'current' frame.
Now, deferredRepaints is cleared in setNeedsDisplayRectangles, as it
was before 9d50ab6c59.
2023-04-18 16:28:52 +01:00
reuk
208be3dd5e
CGMetalLayerRenderer: Fix crash when attempting to render zero-sized components 2023-04-18 11:39:40 +01:00
reuk
68beb74820
NSViewComponentPeer: Fix deferredRepaints bookkeeping when metal rendering is disabled 2023-04-11 12:36:19 +01:00
reuk
9d50ab6c59
CGMetalRenderer: Avoid glitching when resizing views 2023-04-04 19:55:12 +01:00
reuk
fe09902e83
NSViewComponentPeer: Tidying 2023-04-04 19:55:12 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible 2023-04-04 19:55:11 +01:00
reuk
a7563b5e91
NSViewComponentPeer: Ignore peer-level mouse enter/exit events when mouse button is pressed 2023-04-04 19:55:11 +01:00
Anthony Nicholls
05d5c94990
Native: Rename all native files for improved consistency 2023-04-04 19:54:29 +01:00
Oli
fa0b607bf9 Win32 FileChooser: Enable native 'Save' directory 2023-04-03 09:54:30 +01:00
Oli
bc26d5cc87 Win32 FileChooser: Fix truncated initial file text 2023-04-03 09:54:30 +01:00
reuk
ee976f0f0d
NSViewComponentPeer: Avoid using metal renderer if view has changed size since repaints were requested
The main change is that the numFramesToSkipMetalRenderer member has been
removed. The old mechanism had some problems in AU plugins in Logic.
Specifically, when opening a temporary window, repaints would be ignored
until the numFramesToSkipMetalRenderer counter had been decremented to
zero. In practice, this meant that a PopupMenu might not repaint until
the highlighted item had changed five times or more.

With this change applied, repaints that were requested for a particular
window size will use the metal renderer as long as the window hasn't
changed size in the meantime.
2023-03-27 16:46:32 +01:00
reuk
5eadaf75be
UIViewComponentPeer: Avoid accessing text input target after it has been destroyed
In some cases, processing key inputs may cause the currently-focused
text input target to be destroyed. If this happens, we shouldn't attempt
to reset the underlining on the target. We now reset the underlining
before processing key presses.
2023-03-27 16:46:32 +01:00
reuk
9d1a6a3b28
ContentSharer: Update interface to return safer ScopedMessageBox instances 2023-03-27 11:54:37 +01:00
Anthony Nicholls
cff722a4af GUI Basics: Refactor juce_gui_basics file structure
- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
2023-03-16 08:53:12 +00:00
reuk
8942f22a9b
FileChooser: Avoid setting default extension to filename
Fixes a bug on Windows when opening a FileChooser with the following
arguments.

    FileChooser ("",
                 "C:\path\to\file", // filename 'file' doesn't contain '.'
                 "",                // all extensions are allowed
                 true);

The expected behaviour is that the initially-displayed filename is
"file".

The actual behaviour was that the initially-displayed filename was
"file.file".
2023-03-14 20:27:42 +00:00
reuk
33ef4a86f4
Plugin Client: Remove unnecessary wrapper files 2023-03-14 19:13:03 +00:00
reuk
10bd8235e7
Plugin Client: Move all private helper functions into detail namespace 2023-03-13 13:09:30 +00:00
Anthony Nicholls
c23eab7126 iOS: Refactor get primary display 2023-03-07 18:21:38 +00:00
reuk
7da615a7a3
Objective-C: Tidy up block usages, and document block helpers 2023-03-02 13:25:49 +00:00
reuk
28ad953a3a
Xcode: Fix nullability warnings in Xcode 14.3 2023-03-02 12:03:32 +00:00
reuk
55d1585445
NSViewComponentPeer: Allow key equivalents to propagate to inner views if they are not handled by outer views 2023-03-02 12:03:32 +00:00
reuk
edca5e9629
NativeMessageBox: Fix result codes on Linux 2023-03-02 12:03:31 +00:00
reuk
4f7e1d40c8
NativeMessageBox: Silence function pointer cast warning for MinGW 2023-02-28 19:09:26 +00:00
reuk
79ed81c24a
ScopedMessageBox: Add new helper type to bound alert window lifetimes
The biggest new feature in this commit is the addition of
NativeMessageBox::scopedAsync and AlertWindow::scopedAsync, both of
which return an instance of ScopedMessageBox that will hide the message
box in its destructor.

The code for displaying modal dialogs on Windows has also been updated.
Now, the dialog itself is run from a new thread with its own message
loop. This means that when the dialog is dismissed, the background
thread can be joined safely. In plugins, this means that there's no
danger of the plugin view being destroyed from within the message box
runloop, for example.
2023-02-22 21:00:08 +00:00
reuk
ac0ec5a7cc
Windowing: Tidy up macOS drag+drop implementation 2023-02-21 11:11:41 +00:00
reuk
92a19a9ea2
Android: Fix accessibility compatibility issues with older devices 2023-02-15 22:23:56 +00:00
reuk
eecb8ad995 UIViewComponentPeer: Call setNeedsUpdateOfSupportedInterfaceOrientations on orientation change 2023-02-14 22:29:01 +00:00
Tom Poole
29a90a0231
BSD: Fix some compiler warnings 2023-02-14 17:00:02 +00:00
reuk
408f6030e6
NSViewComponentPeer: Attempt to avoid reentrant calls to makeKeyWindow
AUv2 plugins on Arm that are hosted out-of-process (e.g. in Logic 10.7)
can sometimes crash due to endlessly recursing through becomeKeyWindow.
This tends to happen when displaying a secondary window in a plugin,
e.g. an AlertWindow, then clicking on a secondary app, then clicking
back on the AlertWindow.

To avoid this case, we check that the peer isn't already key before
calling makeKeyWindow.

Unfortunately, we can't use isKeyWindow to avoid the recursion because
this may not return true until after becomeKeyWindow has returned.
2023-02-06 19:42:09 +00:00
reuk
f5aa881b6f FileChooser: Improve modal behaviour in plugins on Windows
The previous method for finding the dialog's owner was ineffective, and
it was still possible for other windows to obscure the file picker in
many cases. Using GetActiveWindow seems to produce the expected
behaviour.
2023-02-06 17:29:04 +00:00
reuk
793df5dd3d
iOS Windowing: Avoid private selector warnings 2023-02-06 10:22:41 +00:00
attila
6c720bf3f1 Android: Add simulated mouse exit event to the mouse up callback
Without this event Components such as Button would remain in a hover
state indefinitely after being clicked on a touch screen. The simulated
event matches the behaviour of the other platforms.
2023-02-03 16:11:11 +01:00
attila
043182faa6 Linux: Avoid logging BadShmSeg error when SHM capability is not detected 2023-02-03 16:11:11 +01:00
reuk
5401ad6427
FileChooser: Allow directory selection on iOS 2023-01-25 17:07:24 +00:00
reuk
0f83e90f0d
FileChooser: Fix opening native dialogs in sandboxed macOS apps 2023-01-25 17:07:23 +00:00
reuk
9127ff39a7
Windows: Tidy up function-loader singletons 2023-01-12 19:13:57 +00:00
reuk
164c9121ce
Windows: Fix Vista/7 compatibility 2023-01-12 19:13:57 +00:00
reuk
f4f8f8e86b
iOS: Fix build issues with Xcode 10.1 2023-01-12 19:13:57 +00:00