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

10390 commits

Author SHA1 Message Date
reuk
21b0cd4663
Network: Fix potential deadlock in macOS WebInputStream
Regarding didComplete():

When a WebInputStream is destroyed, the thread of execution will wait in
SharedSession::removeTask() until the task is no longer present in the
list of all active tasks. If multiple threads are all waiting in
removeTask(), then all of those threads should wake when the set of
active tasks changes. Waking only a single thread may result in
deadlocks, as that thread's task may not have completed successfully.
Then, the thread that woke up will be forced to sleep again and may not
get another chance to wake.

Regarding didBecomeInvalid():

Normally, didBecomeInvalid() will only be called after the
SharedSession's destructor. If the destructor is running, we may assume
that no other thread can access the SharedSession, so using notify_one()
in didBecomeInvalid() should be sufficient to wake up the destructor's
thread. However, there's a chance that the NSURLSession may be
invalidated unexpectedly (i.e. before the SharedSession's destructor
runs), in which case there may still be threads waiting in removeTask().
In this scenario we need to notify_all() so that all waiting threads are
able to wake and make progress.
2025-06-30 19:46:19 +01:00
reuk
a2b2813b93
Windows: Update window style flags when toggling kiosk mode
This is a different approach to the change introduced in
04f87320d5.

Instead of completely recreating the window, we now just update the
window's style flags. This should ensure that window and component focus
are preserved.
2025-06-30 16:33:43 +01:00
Anthony Nicholls
52079652d0 Slider: Update docs regarding conversions between values and text 2025-06-30 15:51:04 +01:00
reuk
1dab91e473
WebBrowserComponent: Avoid spinning indefinitely when reaching end of file 2025-06-23 20:33:42 +01:00
reuk
8e6aeab799
WebBrowserComponent: Refactor Linux implementation to simplify cross-process communication 2025-06-23 20:33:42 +01:00
reuk
04f87320d5
Windows: Recreate peer if window styles need to change as a result of entering/leaving kiosk mode
This follows on from the work in
3e70c37ce3.

The previous patch had the intended effect as long as the peer was
recreated after entering kiosk mode. However, for windows initially
created with non-native titlebars, attempting to disable the titlebar
would have no effect.

We now check whether the native style flags would need to change as a
result of changing kiosk mode, and recreate the peer if necessary.
2025-06-23 20:33:42 +01:00
reuk
85a17809ab
Windows: Use isKioskMode() getter where appropriate in peer 2025-06-23 20:23:09 +01:00
reuk
d95cb61acf
WebBrowserComponent: Allow specifying request headers on Linux 2025-06-23 20:23:08 +01:00
reuk
2d243486c9
Windows: Fix bug where mouse events would not reach background windows blocked by modal windows 2025-06-19 18:12:33 +01:00
reuk
b0a3be2bb4
AudioProcessorGraph: Fix bug where channel delays could incorrectly be applied multiple times 2025-06-19 18:12:33 +01:00
reuk
8d935b25b2
Windows: Disable edge-resizer cursors for kiosk-mode windows 2025-06-19 14:45:31 +01:00
reuk
3e70c37ce3
Windows: Disable window decorations for kiosk-mode windows
This fixes an issue where kiosk-mode windows would incorrectly receive
rounded corners and a 1px transparent border.
2025-06-19 14:45:31 +01:00
reuk
aa9b352483
Windows: Use ScopedValueSetter to make function implementation more concise 2025-06-19 14:45:31 +01:00
reuk
70f3c788b7
Toolbar: Avoid use-after-free when toolbar is destroyed before customisation dialog 2025-06-19 14:45:30 +01:00
reuk
9b9b98bc8f
Windows: Make static data members inline 2025-06-19 14:45:30 +01:00
reuk
6bc274286f
Windows: Fix mouse state tracking when mouse leaves window
467f20a7a1 introduced a change to start processing WM_NCMOUSELEAVE
messages as mouse-exit events. This behaviour is not quite correct,
because NCMOUSELEAVE may be triggered when moving the cursor from the
nonclient area to the client area, in which case the mouse is still over
the window.

We now check whether the mouse is really over the window inside
doMouseExit(), and continue to track it if necessary.
2025-06-19 14:45:30 +01:00
reuk
b8e0146a3c
Network: Make Linux networking code robust against user headers that already end with CRLF 2025-06-19 14:45:30 +01:00
reuk
58fabf3a8f
XmlElement: Add new API to allow iterating over attributes 2025-06-19 14:45:30 +01:00
reuk
a3f813d8a5
ToolbarItem: Tidy up constructor 2025-06-19 14:42:49 +01:00
reuk
5d7208bb54
ModifierKeys: Avoid direct access to currentModifiers when reading but not writing 2025-06-19 14:42:49 +01:00
Oli
8fd73d33a8 Graphics: Modify imported libjpeg sources for unity build compatibility 2025-06-19 13:18:43 +01:00
Oli
34c8704a25 Graphics: Import JPEG library code 2025-06-19 13:18:42 +01:00
Oliver James
d651f6740c Fonts: Add OpenType feature support 2025-06-17 12:38:20 +01:00
attila
f371fecb34 Fix compilation when JUCE_USE_LAME_AUDIO_FORMAT=1
This fixes a regression in 1ce35453db.
2025-06-17 10:13:52 +02:00
reuk
fa701a1bd9
SimpleShapedText: Use string with replaced whitspace during fallback font substitution
This is intended to address an assertion that sometimes fired during
shaping text on Android, for example when using the font "Noto Sans
Symbols" and shaping ASCII text including a line break in a multiline
text editor.

The cause of the issue seems to be that the shaper would search for
substitute fonts using the original string content, but would then
replace some characters in the string during shaping. Shaping could then
fail if the font did not contain glyphs for the replaced characters.

We now create a UTF32 string with replaced characters at the beginning
of the shaping process, and use that new string for all queries other
than unicode analysis.
2025-06-16 16:59:55 +01:00
reuk
e5049ad6e9
SimpleShapedText: Avoid UTF8-lookup allocations 2025-06-16 16:59:55 +01:00
reuk
a3d64c7784
Typeface: Enable advanced colour glyph rendering on Android
Android 15+ removed the 'legacy' png-based emoji font. Modern Android
versions may include only a COLR-v1-based font, which JUCE cannot
render itself.

As a workaround, on Android, we use a Canvas object to render each emoji
glyph into a bitmap, and then render that bitmap in the same way as a
legacy png-based glyph. This won't look as crisp as rendering COLRv1
glyphs directly, especially at larger sizes, but this is a sufficient
stop-gap for the time being.
2025-06-16 16:59:55 +01:00
reuk
70a2dd7e15
UIViewComponentPeer: Adopt the UIScene lifecycle on iOS 13+ 2025-06-16 16:59:55 +01:00
reuk
2c5b1fbb6f
NativeMessageBox: On iOS, prefer the peer of the associatedComponent to the focused peer to determine the parent controller 2025-06-16 16:59:55 +01:00
attila
1ce35453db Deprecate the old AudioFormat::createWriterFor functions 2025-06-12 20:02:33 +02:00
attila
386daafe23 WavAudioFormat: Add support for writing 32 bit integral (PCM) format 2025-06-12 20:02:33 +02:00
Anthony Nicholls
34675235e5 VST3: Prevent some warnings 2025-06-12 15:52:01 +01:00
Anthony Nicholls
26edac975d VST3: Fix a bug converting a compatibility ID to a string 2025-06-12 15:52:01 +01:00
Anthony Nicholls
7c7e51176e VST3: Include the name and version in the moduleinfo 2025-06-12 15:52:01 +01:00
Anthony Nicholls
af256aab02 VST3: Prevent a compiler warning 2025-06-11 15:50:44 +01:00
reuk
37bb7a6c30
iOS: Fix deprecation warning 2025-06-10 20:16:02 +01:00
reuk
6f1d116279
macOS: Add initial macOS 26 suport 2025-06-10 20:15:58 +01:00
Anthony Nicholls
46703f3e65 PluginListComponent: Replace inappropriate naming with more suitable alternatives 2025-06-10 16:14:06 +01:00
Anthony Nicholls
f3d7c74ea1 VST3: Allow manifest helper to run independently 2025-06-10 16:13:33 +01:00
Anthony Nicholls
80116d60da VST3: Platform header should be included from user supplied SDK 2025-06-10 16:13:33 +01:00
Anthony Nicholls
c1c8eccb99 Core: Prevent a preprocessor definition leak in zlib 2025-06-10 16:13:33 +01:00
Anthony Nicholls
0181f52c48 OpenGL: Document blend parameter for copyTexture method 2025-06-10 16:13:33 +01:00
Anthony Nicholls
b6d6ec573d GlyphArrangement: Add documentation tag 2025-06-10 16:13:33 +01:00
attila
8ea8cdac6d TextEditor: Allow soft breaks inside words in multi-line mode
This restores the JUCE 7 behaviour.
2025-06-10 12:49:23 +02:00
reuk
492738c9c5
Docs: Fix typo in AudioFormatManager 2025-06-09 11:22:19 +01:00
reuk
5c34248d00
PluginListComponent: Wait for current scan to complete before calling owner.scanFinished()
I observed a deadlock when scanning AU plugins in-process in the
AudioPluginHost, and then clicking the "cancel" button in the scan
progress alert window.

The cause of the deadlock seems to be that JUCE uses async messages to
create and destroy AU plugins on the main thread. When running a plugin
scanner on a background thread, it was possible to end up in a situation
where the background thread was waiting on the message thread to process
a create/destroy message; and, at the same time, the main thread was
blocked waiting for all scan jobs to complete. This seemed to happen
because scanFinished() was called directly from the Scanner's
timerCallback as soon as the progress window was cancelled, even if
there was still a scan in progress at that point.

To avoid the deadlock, we now wait until the current scan has completely
finished before allowing the timerCallback to call scanFinished(). If no
scan is in progress, then the main thread can safely destroy the scanner
ThreadPool without needing to wait at that point.
2025-06-06 23:12:16 +01:00
reuk
dc890c69c2
PluginListComponent: Use lambda form of ModalCallbackFunction 2025-06-06 23:12:16 +01:00
reuk
6cd9566868
GenericAudioProcessorEditor: Avoid creating choice parameter components for discrete parameters with large numbers of steps 2025-06-06 23:12:16 +01:00
reuk
b349531966
AU Host: Avoid caching parameter value strings when getNumSteps() returns a large value 2025-06-03 16:12:00 +01:00
reuk
15f05443d0
Graphics: Add missing JUCE_API annotation to ScopedSaveState 2025-06-03 16:12:00 +01:00