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

10665 commits

Author SHA1 Message Date
attila
07a7c04d54 Android: Include Component enabled state in AccessibilityNodeInfo.setEnabled
A recent change made disabled components traversable by default when
using a screen reader. This change makes TalkBack report such components
as disabled.
2025-07-10 13:51:12 +02:00
attila
c7390a400f PopupMenu: Make header item components disabled, making them non-interactive using screen readers
This makes screen readers report header items as "dimmed" and offering
no action, similarly to native MacOS menu header items.
2025-07-10 13:51:12 +02:00
attila
8433428036 Accessibility: Make the FocusTraverser navigate onto disabled components
With this change disabled components become discoverable by screen
readers, similarly to how OS native user interface components behave by
default.

The KeyboardFocusTraverser will still skip disabled components so this
does not affect keyboard navigation without screen readers.
2025-07-10 13:51:12 +02:00
reuk
02e826dddb
Android: Always set navigation bar colour 2025-07-09 11:30:28 +01:00
reuk
5298225ee7
Android: Set fullscreen peers as content views, instead of floating windows
This is intended to fix an issue when running Android 33 or 34 in desktop/windowing mode.
2025-07-09 11:30:28 +01:00
reuk
5eaa1a9c55
Android: Avoid reflection to simplify ComponentPeerView 2025-07-09 11:30:28 +01:00
reuk
c134ca5d76
OpenGL (Android): Use a simpler approach to register SurfaceHolder callbacks 2025-07-09 11:30:28 +01:00
reuk
be489028dc
Windows: Ensure modifier keys are left in a consistent state after a nonclient button press 2025-07-09 11:28:03 +01:00
reuk
803ab31d21
Windows: Fix bug where stale mouse button state could get sent to windows after a window move
handlePositionChanged() is called when the window changes z-order, which
may cause a new mouse event to be synthesised if the mouse is over the
window after the z-order is updated. In this situation, we may not have
received a mouse up/down/move event to update the current modifier
flags, so we need to update them ourselves.
2025-07-09 11:28:03 +01:00
reuk
17e13c22fc
Android: Fix scaling of bounds and input coordinates for components using a custom desktop scale factor 2025-07-09 11:28:03 +01:00
reuk
90b89e92b2
OpenGL: Respect result of getDesktopScaleFactor() for component hosting OpenGLContext 2025-07-09 11:28:03 +01:00
reuk
ac65cc5434
OpenGLFrameBuffer: Add early-exit in ~TransientState 2025-07-09 11:27:48 +01:00
reuk
1900dd4e4a
OpenGLFrameBuffer: Use ScopeGuard to unbind framebuffer 2025-07-09 11:27:34 +01:00
reuk
c2d52a5499
OpenGLFrameBuffer: Automatically save/restore content when the context is paused/resumed
This addresses an issue where OpenGL-backed image content could get lost
when putting and Android app into an inactive state. This happens
because the GL context gets destroyed, freeing all associated resources.

The workaround introduced here will listen for OpenGL state-change
events, and attempt to save and restore framebuffer content into main
memory, so that the content can be restored once the app is reactivated.
2025-07-09 11:24:43 +01:00
reuk
fc2caf0a4d
OpenGLFrameBuffer: Refactor to move stored OpenGLContext out of TransientState 2025-07-09 11:24:43 +01:00
reuk
29af89c72a
OpenGLFrameBuffer: Refactor pimpl to represent mutually exclusive states with std::variant 2025-07-09 11:24:43 +01:00
reuk
80c4268a5d
OpenGLFrameBuffer: Refactor SavedState in implementation to allow copying and moving 2025-07-09 11:24:43 +01:00
reuk
3991089409
OpenGLFrameBuffer: Refactor pimpl to completely hide SavedState 2025-07-09 11:24:43 +01:00
reuk
0da5827f72
OpenGLFrameBuffer: Remove unused members in implementation 2025-07-09 11:24:43 +01:00
reuk
416da229f2
OpenGLFrameBuffer: Remove outdated info from docs 2025-07-09 11:24:43 +01:00
reuk
22d5d7a598
SimpleShapedText: Fix potential heap buffer overflow 2025-07-03 16:15:03 +01:00
reuk
ac2c863ffa
PopupMenu: Add mouse movement timeout back in
This reimplements similar functionality to that removed in
d39789b021.

Unlike the previous implementation, this version will still wait for the
mouse to move over the menu before the countdown timer is allowed to
start. This should avoid the situation where menu items are accidentally
triggered on mouse-up, after a menu opens under the pointer in response
to a mouse-down.
2025-07-03 16:15:03 +01:00
reuk
6091dc8807
PopupMenu: Refactor highlightItemUnderMouse() to reduce nesting 2025-07-03 16:15:03 +01:00
reuk
640574eaba
Android: Allow modifying the status/navigation bar colours
ComponentPeer::setAppStyle() will now update the status and navigation
bar foreground colours, with some caveats:

- Status and nav bar backgrounds are now always completely transparent.
- The navigation bar foreground colour can only be changed on Android
  API 26 or higher.
- For platforms using gesture controls instead of button controls, the
  system automatically determines the colour of the gesture bar. On
  those systems, setAppStyle() will only affect the status bar colour.
2025-07-03 16:15:03 +01:00
reuk
5bb20e8e04
Direct2DImage: Flush CPU-only changes if necessary when copying images 2025-06-30 20:04:56 +01:00
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