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

3406 commits

Author SHA1 Message Date
reuk
fc32ca8641
AlertWindow: Store a SafePointer to the associatedComponent 2025-06-03 16:08:56 +01:00
reuk
4ec935c709
Android: Refactor mouse handling to avoid repeated code 2025-06-03 16:08:56 +01:00
reuk
1741f6df29
Android: Update handling of ACTION_CANCEL to terminate all ongoing pointer events, instead of just the primary pointer 2025-06-03 16:08:56 +01:00
reuk
f904fd356a
Android: Improve screen safe-area reporting
The goal of this change is to ensure that the safeAreaInsets and
keyboardInsets members of Display correctly take the current system UI
and screen cutouts into account.

This change also enables rendering behind the status bar and navigation
bar for JUCE applications. This is in line with the new defaults in
Android 15, where building against the Android SDK 35 will automatically
enable "edge-to-edge" drawing. Enabling this behaviour on older
platforms too provides a more consistent experience.
2025-06-03 16:08:20 +01:00
reuk
cfc006aaf9
SidePanel: Add an option to restrict content to the safe screen area
A major benefit of this change is that the menu in the DemoRunner will
now display reasonably on mobile devices with notches or other
decorations.
2025-06-03 16:08:20 +01:00
Tom Poole
b0d569c74b Bump version number to 8.0.8 2025-06-02 09:24:54 +01:00
attila
a272b35261 TextEditor: Fix lines being invisible beyond the word wrap width 2025-05-21 17:47:20 +02:00
attila
0e4287df52 ShapedTextOptions: Rename maxWidth to wordWrapWidth
The old name didn't communicate it clearly enough what the parameter was
used for. This started to show when alignmentWidth was added.
2025-05-21 17:47:20 +02:00
reuk
84eed04a59
Component: Add function to clear all cached image resources
In the DemoRunner, switching to and fro between the Settings tab and
the Demo tab displaying the OpenGL demo could lead to
GL_INVALID_OPERATION errors. This is because closing the demo shuts
down the GL context, destroying resources such as framebuffers. If any
Image objects backed by framebuffers outlive the context, they will be
invalidated. Component effect images are especially likely to hold onto
invalid framebuffer references.

With this change in place, images cached by Components will be
invalidated when the attached GL context goes out of scope, and will be
recreated when the new context is created.
2025-05-19 13:32:52 +01:00
reuk
bf54fb1fe9
Component: Recreate cached images if ideal type changes
This is intended to fix an issue where drawing a component snapshot into
a temporary OpenGL image can fail, because the GL context may not be
bound.
2025-05-19 13:32:52 +01:00
reuk
2f0b287ce7
ContentSharer: Fix variable shadowing warnings in Android impl 2025-05-19 13:30:27 +01:00
Sudara
9a4ab937ad Docs: Fix a few tiny typos in comments 2025-05-08 16:33:24 +02:00
Oli
6972c4f0e3 Direct2D: Fix ETW tracing build errors
This makes Direct2DMetrics and current frameId accessible to implementation subclasses.

It also replaces JUCE_WRITE_TRACE_LOG with JUCE_WRITE_TRACE_LOG_VA as intended in original implementation.

Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-30 10:50:52 +01:00
reuk
8d29edec92 Direct2D: Move CompositionTree to Direct2DHwndContext.cpp 2025-04-24 13:58:24 +01:00
reuk
8d33428dcf Direct2D: Move WindowsScopedEvent to Direct2DHwndContext.cpp 2025-04-24 13:58:24 +01:00
reuk
f56c7faf40 Direct2D: Move SwapChain into Direct2DHwndContext.cpp 2025-04-24 13:58:24 +01:00
reuk
0071f4741c Direct2D: Make protected members of Pimpl private/public as appropriate 2025-04-24 13:58:24 +01:00
Oli
093df763ba Direct2DHwndGraphicsContext: Always use default adapter
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:24 +01:00
Oli
e177c5f8f4 Direct2DHwndGraphicsContext: Shorten lines longer than 100 characters 2025-04-24 13:58:24 +01:00
Oli
44d304b468 Direct2D: Use PostMessage for swapchain events
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:24 +01:00
Oli
f75fb7f452 Windows: Use SoftwareImageType for Icon conversions
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Oli
27946ba063 Effects: Use compatible image type for DragAndDropContainer
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Oli
531d21e503 LookAndFeel: Use preferred temporary image type for progress bars
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Oli
4ba01a80a0 Component: Use Context appropriate ImageType for temporary images
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
Matt Gonzalez
e9a5531587 Direct2D: Disable software backup for component effect image
Co-authored-by: Matt Gonzalez <matt@echoaudio.com>
2025-04-24 13:58:23 +01:00
reuk
c167c6dfde Direct2D: Move ImagePixelDataNativeExtensions into separate header 2025-04-24 13:58:23 +01:00
reuk
18b508343d Direct2D: Move Direct2DResources to juce_DirectX_windows.h 2025-04-24 13:58:23 +01:00
reuk
b5b7dd5696 Direct2D: Move Direct2DHelpers into juce_DirectX_windows.h 2025-04-24 13:58:23 +01:00
attila
6a53ddcb77 TextEditor: Restore JUCE 7 behaviour for the first line's alignment when line spacing > 1 2025-04-23 18:11:26 +02:00
attila
56b7b7621e TextEditor: Fix caret size in first and last position when line spacing is non-unity 2025-04-23 18:11:26 +02:00
attila
d2d5e9bdd2 TextEditor: Fix setLineSpacing
Applies the previously missed line spacing value of the TextEditor.

The changes in JustifiedText fix calculating the vertical position of
the first line for the case where ShapedTextOptions has the following
settings:

isBaselineAtZero() == false,
getHeight().has_value() == false
getLeading() > 1.0f

This case however is only triggered by the TextEditor, as with all
functions in GlyphArrangement at least one setting is different.
2025-04-23 18:11:26 +02:00
attila
e23969f3ce TextEditor: Fix drawing text in the wrong colour 2025-04-23 18:11:26 +02:00
Oli
878ac1a23f DirectX: Reduce shared resource thrashing in VBlank 2025-04-17 14:23:32 +01:00
attila
087f915595 NSViewComponentPeer: Ignore mouseDragged messages during DnD operations
Prior to this change trying to drag and drop a file onto a target inside
a Viewport could cause hectic scrolling events.
2025-04-17 10:27:24 +02:00
reuk
a8c85f5969
SafePointer: Add new equality operators to avoid ambiguous operator warnings with clang 14 2025-04-14 13:05:28 +01:00
Tom Poole
99b752a1d2 Bump version number to 8.0.7 2025-04-08 10:51:07 +01:00
attila
9083cd9135 Fix TextEditor crash when Font resolution fails 2025-04-02 15:33:27 +02:00
reuk
e3df22a4ea
NSViewComponentPeer: Fix use-after-free when closing windows with the keyboard 2025-04-01 11:49:48 +01:00
attila
7f4176e259 Fix potential crash in Ableton Live when dismissing the plugin window with Esc
The crash could be reproduced with a WebBrowserComponent, but it was not
the root cause of it.
2025-03-27 17:41:18 +01:00
attila
bd015f5c97 Fix psabi warning emitted by GCC on ARM64
The type std::pair<Point<float>, float> inherits from an empty base on
C++17. Due to a bug in GCC 10.1 this would prevent the compiler from
treating it as a HFA type, and it would use a different register to pass
it, than it does in newer GCC versions. Because of this ABI change an
ABI warning is emitted by GCC today, hinting at this fact.

By using a custom struct that does not inherit from an empty base we are
avoiding emitting this warning.
2025-03-25 10:20:57 +01:00
attila
5f5a247f82 TextEditor: Fix centred and right alignment when word wrap is disabled 2025-03-20 21:12:32 +01:00
reuk
9730cd2808
FileChooser: Store strong reference to Native instance inside async callback 2025-03-19 11:06:18 +00:00
reuk
cd981c1b1a
FileChooser: Guard against use-after-free 2025-03-19 11:06:18 +00:00
reuk
5e44dc0b95
DragAndDropContainer: Fix issue where drag images in plugins could appear on the incorrect display
This issue could be seen when dragging widgets (e.g. rows in the
ValueTreesDemo) from a plugin on a multi-monitor Windows system.
2025-03-19 11:06:17 +00:00
reuk
51be8b9332
Android: Remove unnecessary SDK version checks 2025-03-19 11:06:17 +00:00
attila
ae4bca24f4 TextEditor: Fix crash when the caret is beyond a newline in the last position 2025-03-18 15:14:10 +01:00
attila
432a7e1c9a Fix C++20 compilation 2025-03-14 10:03:11 +01:00
attila
9ce2feaf41 TextEditor: Improve Unicode editing behaviour and performance 2025-03-13 12:16:16 +01:00
reuk
d77b34f432
PopupMenu: Add notes for testing scenarios 2025-03-05 21:27:51 +00:00
reuk
d39789b021
PopupMenu: Remove timeout before highlighting item under mouse
We now require a mouse movement before highlighting menu items. This is
intended to ensure that the user has intentionally highlighted the menu
item that they wish to trigger.
2025-03-05 21:27:51 +00:00