1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00
Commit graph

966 commits

Author SHA1 Message Date
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
reuk
98d5dc84e6
FileChooser: Get rid of unnecessary shared-ptr in win32 native implementation 2021-04-07 16:24:38 +01:00
reuk
b952d0204e
FileChooser: Pump message thread in destructor
IFileDialog::Show and CoUninitialize both seem to require the main
message loop to be active and running when they are called. If we block
the message thread while calling these functions, we may cause a
deadlock.

The destructor of the Win32NativeFileChooser was blocking the message
thread until the background thread exited, but the background thread was
unable to make progress while the message thread was blocked.

To work around this issue, we now pump the message thread in the
destructor of the Win32NativeFileChooser. If a dialog is currently
active, this should allow it to exit gracefully.

Note that we cannot use MessageManager::runDispatchLoopUntil here:
- MessageManager::runDispatchLoopUntil will not process any messages if
  the quit message has been received, which could lead to deadlocks if the
  FileChooser is destroyed after the quit message has been posted.
- This function isn't defined when JUCE_MODAL_LOOPS_PERMITTED is disabled.
2021-04-07 16:24:38 +01:00
ed
faf5ed4023 Linux/X11: Prefer CLIPBOARD selection to PRIMARY
As specified in https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt, CLIPBOARD should be used for explicit cut/copy/paste operations over PRIMARY
2021-04-06 09:31:52 +01:00
Tom Poole
765eafb1eb Fixed some file permissions 2021-03-31 10:12:59 +01:00
ed
762cf327be macOS: Removed static display change callback 2021-03-29 09:20:16 +01:00
ed
bb94767e3b Linux: Fixed a compile error when JUCE_USE_XRENDER=1 2021-03-28 18:19:04 +01:00
Tom Poole
a9ad07a945 Use RAII for CFTypes 2021-03-25 15:48:35 +00:00
reuk
767f63dfb0
UIViewComponentPeer: Fix issue where heavyweight windows could "drift" when resized slowly 2021-03-25 11:51:28 +00:00
reuk
92ca22c080
UIViewComponentPeer: Fix issue where view may be accessed after deletion 2021-03-25 11:51:28 +00:00
reuk
5bcd2b0dfb
NSViewComponentPeer: Force repaint when window becomes key
This resolves an issue on macOS Catalina when using
JUCE_COREGRAPHICS_DRAW_ASYNC where windows would sometimes fail to
completely repaint when they were unminimized.
2021-03-17 14:29:08 +00:00
reuk
8fb4541fdb
iOS: Avoid unnecessary numeric conversion 2021-03-15 19:23:01 +00:00
reuk
d4e802016a VST3: Fix issue where Ardour would repeatedly try to resize editors
Ardour seems to listen to the bounds of the plugin window, and will call
`onSize` on the plugin editor when move/resize events are sent to the X
window - even if the size of the window didn't really change. This can
result in an infinite resize loop, where calling `onSize` on the VST3
instance sends a resize event to the plugin window, and this event
causes Ardour to call `onSize` on the plugin view.

To get around this, the Linux ComponentPeer will no longer request a
bounds change from the window system if the requested bounds are the
same as the current bounds.
2021-03-11 16:51:35 +00:00
ed
40c86d6b2f Linux: Fail more gracefully on systems which don't support 32-, 24-, or 16-bit RGB displays 2021-03-09 12:11:05 +00:00
reuk
3afaaa48be FileChooser: Fix IFileDialogEvents leak 2021-03-08 11:23:16 +00:00
ed
c32142a215 Windows: Fixed a build error and some unreachable code warnings when JUCE_WIN_PER_MONITOR_DPI_AWARE=0 2021-03-05 18:40:03 +00:00
reuk
7a0b17c0d3 LinuxComponentPeer: Fix scaling in custom windows created by plugins
Previously, things like PopupMenus which were created in their own
windows were not being scaled correctly on HiDPI displays on Linux.

This patch forces the display scale to 1.0 in plugins, meaning that
the transform applied to the main plugin window is the sole source
of truth for component scaling in plugins.
2021-03-04 13:56:03 +00:00
reuk
fd2f866dd1 FileChooser: Avoid throwing bad_weak_ptr
It seems like shared_from_this may not be enabled when a unique_ptr is
assigned to a shared_ptr (although it *should* be enabled when
constructing a new shared_ptr from a unique_ptr). Functions that return
objects that may need to use shared_from_this now return shared_ptr,
just to be safe.

Additionally, in some cases, shared_from_this was being called from
Thread::run after the last reference to the shared object had been
released. We now call shared_from_this during 'open', which will always
run on the message thread while at least once reference to the shared
object is alive.
2021-03-03 19:21:43 +00:00
ed
1ff7fc38b1 Windows: Added ScopedDeviceContext helper 2021-03-02 15:56:55 +00:00
ed
f6338c0f8e Windows: Added ScopedThreadDPIAwarenessSetter for correctly setting and resetting thread DPI-awareness for methods which interact with an HWND and removed some DPI workarounds 2021-03-02 15:56:10 +00:00
ed
3a0af69eff AudioPluginHost: Added an application-level setting for scaling plug-ins on Windows 2021-03-02 15:53:45 +00:00
reuk
45409bb4e6
FileChooser: Hide chooser when it leaves scope on Windows 2021-03-02 10:49:39 +00:00
ed
e18284978f FileChooser: Check JUCE_MODAL_LOOPS_PERMITTED in Native::runModally() 2021-02-22 09:08:09 +00:00
ed
3d378d0384 Windows: Avoid setting WINDOWPOS in handlePositionChanging() when "new" coordinates are floating-point rounding errors due to scale factor conversion 2021-02-19 19:07:12 +00:00
ed
ec0345c093 Windows: Check whether child HWNDs were already scaled during the scale factor listener callback to avoid double-scaling them in handleDPIChanging() 2021-02-19 19:07:12 +00:00
ed
cb57904740 Windows: Improved support for DPI-aware embedded windows in HWNDComponent 2021-02-19 19:07:05 +00:00
reuk
d5b55a8474
X11: Make setFullscreen put windows into true maximised mode 2021-02-16 15:39:31 +00:00