1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00
Commit graph

1542 commits

Author SHA1 Message Date
reuk
85226c33d4
Mac MainMenu: Allow commands without modifiers to be passed to peer
Ideally, we want to pass shortcut keys to the component to handle, and
only fall back to invoking a menu item if the component was unable to
handle the keyboard event, or if the action was triggered by
clicking/selecting an item in the menu itself. The old implementation
tried to work out whether the action was triggered by a shortcut by
checking the event's characters and modifiers. This method was
inaccurate, because some shortcuts (such as arrow keys) may add
unexpected numpad/function modifier flags.

We now try handling shortcut keys directly in the peer, and pass events
up to the superclass (which will forward them to the main menu) if the
event could not be handled.

This commit also adjusts some Objective-C method signatures to use the
correct string encoding for the BOOL type.
2021-07-14 14:49:05 +01:00
ed
a5c3b81f82 Use C++14 lambda capture initialisers for initialising deletion checkers 2021-07-12 11:58:29 +01:00
Tom Poole
d53388097b AudioProcessorGraph: Improve performance when building large graphs 2021-07-08 10:47:36 +01:00
ed
09c06fb946 macOS Accessibility: Fixed an incorrect deployment target check 2021-07-06 16:02:19 +01:00
attila
e867d1dbb4 Linux: Fix maximise when not using native titlebar
X11 cannot maximise windows that have their maximum size set. When not
using the native titlebar we now revert to setting the window bounds
without involving the X11 maximise function.
2021-07-06 10:26:14 +02:00
reuk
630afbda54 NSViewComponentPeer: Avoid processing mouse events from tracking areas
Some plugins (Izotope Relay, some older DPF plugins) use NSTrackingAreas
to handle mouse events, but unprocessed events seemingly get passed up
to outer views. Processing these events was causing unexpected
behaviour. For example, if the cursor entered a plugin view while
dragging a JUCE window border, a mouseEnter event was be generated,
interrupting the drag.

We now check whether mouse events were generated by an NSTrackingArea
which does not belong to the JUCE view, and ignore the event in this
case.
2021-07-05 12:21:36 +01:00
ed
a9d17d860c macOS Accessibility: Fixed crash due to availability of NSAccessibilityLayoutChangedNotification on < 10.9 2021-07-05 12:07:30 +01:00
ed
d1b669e6ae Accessibility: Added InternalAccessibilityEvent::elementMovedOrResized 2021-06-16 17:22:35 +01:00
ed
cdf3b619d8 Accessibility: Check if any accessibility clients are active before posting notifications and announcements 2021-06-16 17:22:00 +01:00
ed
3195db14a4 macOS: Check subview position in ComponentPeer::toFront() and toBehind() before re-ordering subviews for shared windows
This commit also removes the subview from its superview's subview array before re-ordering as the macOS docs don't make any guarantees about what happens when adding a subview that is already contained in the array.
2021-06-15 10:14:56 +01:00
ed
cae59fa8b2 macOS Accessibility: Return window title for accessibilityTitle property in JuceNSWindowClass 2021-06-14 14:29:53 +01:00
ed
8f3483d532 Whitespace 2021-06-14 14:01:43 +01:00
ed
f69095746a Windows Accessibility: Only support ExpandCollapsePattern for expandable elements 2021-06-11 13:50:47 +01:00
ed
d16657ab53 macOS Accessibility: Fixed crashes on macOS < 10.10 when posting notifications 2021-06-11 13:48:18 +01:00
ed
005d45e0fe macOS Accessibility: Removed some unused text methods and return caret position for accessibilitySelectedTextRange when no text is selected 2021-06-11 13:47:00 +01:00
ed
d5175b6e23 Windows: Use ScopedThreadDPIAwarenessSetter in keyboard hooks to set correct thread DPI awareness 2021-06-10 18:14:50 +01:00
reuk
a70488e38e MacOS: Fix API deprecations in macOS 12.0 and iOS 15.0 2021-06-10 15:20:39 +01:00
reuk
1ee106d730
PopupMenu: Avoid dismissing PopupMenus in bridged plugin editors
When bridging 32-bit/64-bit plugins on Windows, the plugin is hosted in
an auxilliary process, and the plugin's editor is embedded into an HWND
owned by a different process (the plugin host).

Previously, the `isForegroundProcess` check would fail for bridged
plugins, because the foreground window may belong to the DAW, rather
than to the auxilliary hosting process.

This patch adds an additional check, to find whether the same process
owns both the foreground window, and the window which embeds the
PopupMenu's target component. In this case, we avoid immediately
dismissing the PopupMenu.
2021-06-08 14:57:42 +01:00
ed
521faf2dc6 macOS Accessibility: Send NSArray for NSAccessibilityLayoutChangedNotification 2021-06-07 19:38:29 +01:00
ed
9ed55a7639 Accessibility: Added AccessibilityEvent::titleChanged 2021-06-07 19:38:29 +01:00
ed
e4f9e7f79b macOS Accessibility: Use @available keyword where possible to check if accessibility support is available at runtime 2021-06-07 19:38:29 +01:00
ed
8b2f3088d7 Accessibility: Added AccessibilityTextInterface::isReadOnly() method and AccessibilityRole::label to distinguish between navigable and selectable read-only text elements and simple labels 2021-06-07 19:38:29 +01:00
reuk
7ac6911ccc
Windows: Fix clang/gnu compiler warnings 2021-06-03 17:30:44 +01:00
ed
963fd79e6a Windows Accessibility: Improved support for read-only text interfaces and fixed issue causing text past 1000 characters to not be read out by Narrator 2021-05-28 14:50:57 +01:00
ed
05f987d893 macOS Accessibility: Use value interface for accessible read-only text 2021-05-28 14:48:59 +01:00
ed
1634d9f428 macOS: Fixed a build error when building against SDKs < 10.13 for deployment targets < 10.10 2021-05-27 18:52:02 +01:00
reuk
35260b342c
NSViewComponentPeer: Adjust bounds before constraining when resizing 2021-05-26 15:37:42 +01:00
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
2021-05-26 15:34:26 +01:00
ed
8a6a520026 iOS: Check if text entry caused TextInputTarget deletion before calling updateHiddenTextContent() 2021-05-26 09:21:30 +01:00
ed
a192e27961 macOS: Set NSWindow accessibilityElement property to prevent VoiceOver reading out notifications for inaccessible windows 2021-05-26 09:20:59 +01:00
ed
02c5ad29db macOS: Disable accessibility on deployment targets < 10.10 2021-05-26 09:20:59 +01:00
reuk
3b93d5d7eb FileChooser: Allow multiple directory selection on Linux/Zenity 2021-05-24 19:41:11 +01:00
reuk
bad031aa03 iOS: Enable support for layered/async drawing 2021-05-24 15:55:29 +01:00
reuk
73523cd6a5
UIViewComponentPeer: Add support for hover and scroll events from external mice and trackpads 2021-05-21 17:00:10 +01:00
ed
b34e798f39 Accessibility: Fixed some bugs in Windows text navigation and readouts, improved selection and focus navigation 2021-05-20 18:24:59 +01:00
ed
c359f99fb5 Accessibility: Improved macOS support for offscreen rows/cells 2021-05-20 18:24:58 +01:00
reuk
c19cd73306
HWNDComponentPeer: Avoid dismissing modals from peer-initiated messages 2021-05-14 17:41:32 +01:00
ed
8b74ec2fb7 MinGW: Exclude native accessibility code 2021-05-12 08:02:20 +01:00
ed
70d0657f00 Windows: Only load UIA functions when accessibility is active 2021-05-11 15:57:54 +01:00
ed
ec990202b1 Accessibility: Added VoiceOver (macOS) and Narrator (Windows) accessibility screen reader support to juce_gui_basics 2021-05-10 10:53:14 +01:00
reuk
19821db2a3
HWNDComponentPeer: Dismiss modals when windows are moved
This change ensures that popup menus will be dismissed when hosted
plugin windows are moved, even when these plugin views are themselves
hosted inside JUCE views, like those used in the AudioPluginHost.
2021-05-04 14:24:22 +01:00
reuk
e9b26887dd
NSViewComponentPeer: Fix bug where components could draw with unwanted translation
When drawing a popup menu for a target component with a non-unity scale,
the contents of the component were being drawn with an unwanted vertical
offset.
2021-04-29 17:43:31 +01:00
reuk
6e5645bf8f
macOS Windowing: Revert unnecessary change which produced incorrect monitor bounds 2021-04-29 17:43:31 +01:00
reuk
f73f8ee849
NSViewComponentPeer: Use JUCE-style coordinates to position subviews 2021-04-28 15:38:10 +01:00
reuk
ec43c7f61c
FileChooser: Remember previous file location on Windows 2021-04-28 13:46:55 +01:00
reuk
1e606ddb32
MainMenu: Allow components to directly handle shortcut keys which trigger menu items
This fixes a regression introduced by
6e9261ea66 which meant that components
were not given a chance to respond to shortcut keypresses if those same
keypresses were registered for a menu item. This resulted in behaviour
where shortcuts such as 'cmd+c' would not be passed to a focused
TextEditor if a different command with the same shortcut was registered
in the main menu.

With this change in place, we now check whether the menu item's shortcut
keys match the current event's pressed keys. If the keypresses match, we
can assume that the event was triggered by the keyboard, and dispatch
the keypresses to the ComponentPeer. If the keypresses do not match,
then the menu item was likely selected using space/return, or by
clicking, in which case the event is dispatched directly to the
ApplicationCommandManager.
2021-04-20 17:21:08 +01:00
reuk
146c8573ca
X11: Fix drag-n-drop bug in the XWindowSystem class
This resolves a regression which was introduced in
74ca3b44c4.

Prior to that commit, drag and drop on Linux/X11 worked as expected.
DragAndDropContainer::performExternalDragDropOfFiles allowed dropping
files onto other applications.

After the faulty commit, this function may cause the window manager to
enter a bad state in which the drag operation never finishes, making it
impossible to switch between windows or close windows.

I think the issue happens because the DnD source may receive (spurious?)
XdndLeave messages during the drag, which cause the peer's entry in the
dragAndDropStateMap to be removed. Before the faulty commit, each peer
had its own drag and drop state object, which was not destroyed in this
way.

This change will keep the peer's drag state object alive, even when an
XdndLeave message is received. The entry will still be removed when the
peer's window is destroyed.
2021-04-14 12:36:48 +01:00
ed
11d872ea1b MessageMananger: Made dispatchNextMessageOnSystemQueue() accessible by internal code 2021-04-13 16:25:04 +01:00
ed
58761a44c1 Linux: Made X11Symbols singleton thread-safe 2021-04-08 11:51:41 +01:00
reuk
a10cc6faff
FileChooser: Improve MinGW compatibility 2021-04-07 16:24:39 +01:00