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

10736 commits

Author SHA1 Message Date
Tom Poole
d1fc79aef0 Docs: Fix some broken Doxygen links 2026-01-20 16:28:09 +00:00
reuk
61c9456010
HWNDComponentPeer: Fix scaling bug in contains()
This bug was introduced in b4c28db765.

The argument to contains() is in peer space (logical pixels relative to
the peer's top left). To convert to relative physical pixels, logical
pixels should be multiplied by the peer's scale factor, *not* divided.
2026-01-20 10:55:13 +00:00
reuk
7685a84c81
HWNDComponentPeer: Avoid glitches and sluggishness during live resize
258203706c introduced a problem where
live-resize of a window would cause the window content to flash and slow
down.

The cause of the errant behaviour seems to be that, during resize, many
WM_PAINT messages might be dispatched over the course of a single vblank
interval. Then, each of these paint calls was waiting for the next
vblank interval to display. This additional waiting resulted in
sluggishness, since many frames would have to be presented before the
presentation 'caught up' with the current window size. This also meant
that many consecutive frames were presented with stale window size
information.

The solution added here simply checks whether we're live resizing, and
uses the vblank instead of WM_PAINT to synchronise repaints during the
resize operation.
2026-01-20 10:55:13 +00:00
reuk
d5a84475da
HWNDComponentPeer: Remove handling for WM_ERASEBKGND
We'll always paint over the entirity of the invalid area, so filling in
the background is redundant work.
2026-01-20 10:55:13 +00:00
reuk
11e8149e65
HWNDComponentPeer: Avoid static bool for reentrancy check
It probably makes more sense to restrict the reentrancy check to the
current peer, rather than using a single flag for all peers.
2026-01-20 10:55:13 +00:00
reuk
5f032cff63
SwapChain: Remove unused event
Now that we're no longer using the swap chain as a vblank timer, we can
avoid fetching the event that was previously used for synchronisation.
2026-01-20 10:55:13 +00:00
reuk
cf3dbc8d88
UpdateRegion: Validate window on receiving NULLREGION
This fixes a bug where opening a foreground window could occasionally
prevent background windows from repainting. The symptom seems to be
caused by the system repeatedly sending WM_PAINT messages to the
foreground window and ignoring the background window. It seems that the
system will repeatedly call WM_PAINT until the entire region has been
validated - even if that region is null.
2026-01-20 10:55:13 +00:00
reuk
be99ae4c05
Add some missing nodiscards 2026-01-20 10:55:13 +00:00
Tom Poole
bd2f465321 Docs: Add some missing code formatting 2026-01-16 14:09:22 +00:00
attila
23ed760572 WebBrowserComponent: Windows: Fix WebView2 compilation in x86
The COM interface functions use __stdcall, which can't be passed to a
function expecting a __thiscall function. This distinction is irrelevant
when compiling in x64 mode.
2026-01-16 13:49:29 +01:00
attila
150f7c5bd9 Button: Make setToggleState effective even when disabled
This commit partially reverts 07f801143c.

While it's justifiable that triggerClick() is guarded and ineffective
when the button is disabled, setToggleState() needs to work to correctly
represent the underlying parameter state.
2026-01-13 15:58:22 +01:00
reuk
8ab6c3bb9e
CoreAudio: Fix build issue with Xcode 15.2 due to iterator traits requirement 2026-01-13 12:38:44 +00:00
attila
c3ca21e73d WebBrowserComponent: Improve ResourceProvider performance on Linux
By writing the data member into the pipe without serialisation, the
throughput between the main application and the WebView subprocess
increases from 0.7 MB/s to over 100 MB/s. Measured on a 2.2 GHz Intel
8th gen CPU in Debug build.
2026-01-13 11:18:51 +01:00
attila
bc7339fe07 VST Host: Linux: Map plugin window even with XEMBED_MAPPED unset 2026-01-08 12:40:43 +01:00
attila
04bba0f2be VST3 Host: Linux: Map plugin window even with XEMBED_MAPPED unset 2026-01-08 12:40:43 +01:00
attila
9d45b5bc30 XEmbedComponent: Add new option to ignore the XEMBED_MAPPED flag 2026-01-08 12:40:43 +01:00
attila
fde2512f64 XEmbedComponent: Add new constructor taking XEmbedComponentOptions 2026-01-08 12:40:43 +01:00
reuk
457cf9ecef
MidiDevices: Reinstate unique idenfiers for virtual bytestream ports 2026-01-07 17:30:23 +00:00
reuk
f4ba4c1ad9
MPEZoneLayout: Correctly handle 14-bit pitch-bend ranges
Previously, the MPEZoneLayout could only handle pitch-bend range
adjustments that ended with the MSB. If the final controller message was
the LSB, this resulted in the range being set as a 14-bit value, with a
value 128 times higher than intended.
2026-01-07 17:30:23 +00:00
Anthony Nicholls
0e43b31e50 tie: Hide tie implementations from public API
This speeds up header includes
2025-12-22 09:54:33 +00:00
Anthony Nicholls
97ce101d6a Graphics: Hide rendering helpers from public API
This should help speed up includes of the juce_graphics header file
2025-12-22 09:54:33 +00:00
Anthony Nicholls
f22e9585d4 GUI Basics: Split module into multiple compilation units
This should help prevent gui_basics becoming a bottleneck during builds.
2025-12-22 09:54:33 +00:00
Anthony Nicholls
696ad7648c ASIO: Fix compiler warnings 2025-12-22 09:53:31 +00:00
Anthony Nicholls
157e115d09 Component: Improve performance and opaque checks 2025-12-22 09:50:25 +00:00
Anthony Nicholls
21ae78c373 In-app purchases: Add a warning when JUCE_IN_APP_PURCHASES_USE_SANDBOX_ENVIRONMENT is defined 2025-12-19 12:20:39 +00:00
reuk
258203706c
Direct2D: Use WM_PAINT and vblank callbacks to drive painting 2025-12-17 18:05:46 +00:00
reuk
22ae5baa42
Direct2D: Remove SwapChainThread completely
D2D repaints are always driven by a vblank timer, and D2D presentation
can't happen any faster than the vblank callbacks, so I think it's safe
to remove the swapchain machinery and to rely entirely on the vblank
callbacks instead.
2025-12-17 18:05:46 +00:00
reuk
cd6176bd00
UpdateRegion: Fix bug where storage for update regions was never reallocated 2025-12-17 18:05:46 +00:00
reuk
65206568c4
HWNDComponentPeer: Remove dispatchDeferredRepaints() 2025-12-17 17:44:17 +00:00
reuk
8eea88dec3
Direct2DHwndContext: Remove unnecessary prefixes 2025-12-17 16:22:39 +00:00
reuk
f6a81fe5f2
WebBrowserComponent: On Linux, avoid asserting when no callback is passed to evaluateJavascript() 2025-12-17 15:20:48 +00:00
reuk
ea5cffcbd2
XEmbedComponent: Improve formatting 2025-12-16 12:29:59 +00:00
reuk
f48ca1b1e3
XEmbedComponent: Update embedded window size when peer scale changes 2025-12-16 12:29:59 +00:00
reuk
28aa387f8d
VST Host: Fix issue where the Component bounds computed for a hosted editor on Linux could be incorrect for non-unity scale factors 2025-12-16 12:29:59 +00:00
reuk
8e4832dcf5
WebBrowserComponent: Improve formatting 2025-12-16 12:29:59 +00:00
reuk
14ee9e46ff
WebBrowserComponent: Fix bug where Linux browser process could segfault during shutdown
This issue could be observed when loading the WebViewPluginDemo in the
AudioPluginHost, opening its editor, and then attempting to close the
editor window using the titlebar button. Tested on Fedora 42 with
libwebkit2gtk-4.1.

Unloading the webkit library with dlclose seems to cause the webview
process to crash, even if gtk_main() has already exited at that point.

Maybe this points to a need to manually clean up the webview somehow
before calling gtk_main_quit, but I can't see any obvious candidate
functions in the docs (gtk_widget_destroy doesn't seem to help).

The workaround presented here just opens the webkit library with
RTLD_NODELETE, which isn't ideal but might be necessary if this library
hasn't been designed with dynamic load/unload in mind.
2025-12-16 12:23:59 +00:00
reuk
3b569d5801
WebBrowserComponent: Fix hang when browser window exits unexpectedly
If the browser process happened to segfault, the old WIFEXITED check
would never succeed and the loop would never break.

The issue is resolved by additionally checking for other statuses that
also indicate that the child process is no longer alive.
2025-12-16 12:23:59 +00:00
reuk
983cbdc441
VST Host: Use a "wrapper" window on Linux so that the client does not have to be responsible for window position
Previously, on Linux, client plugin editors were embedded directly into the peer
displaying the client's AudioProcessorEditor.

Although this approach is simple and lightweight, it means that plugin
editors are able to reposition themselves over controls in the parent
window just by calling XMoveResizeWindow or similar on their own widget.

It's more desirable that the client editor should be clipped if it
attempts to draw outside the area of the AudioProcessorEditor.
2025-12-16 12:23:59 +00:00
reuk
cad3e2f054
LV2 Client: Avoid potential nullptr deref when widget is not set by client UI 2025-12-16 12:23:59 +00:00
reuk
aaa204c608
LV2 Client: Avoid advertising noUserResize as extension data 2025-12-16 12:23:59 +00:00
reuk
e57dac4a63
LV2 Host: Avoid sending resize events back to the plugin if they originated from the plugin 2025-12-16 12:23:59 +00:00
reuk
648a7bcecc
LV2 Host: Avoid checking for noUserResize in UI extension data 2025-12-16 12:23:59 +00:00
reuk
3bc7692868
LV2 Host: Fix some confusion between logical/physical coordinate spaces 2025-12-16 12:23:59 +00:00
reuk
1c2d5f69f3
LV2 Host: Avoid double-nesting XEmbed views
This fixes an issue where some LV2 plugin UIs failed to display
correctly. The issue seemed to be more likely to manifest on a plain
Xorg session.
2025-12-16 12:23:59 +00:00
reuk
167d9b64c3
LV2 Host: Query ComponentPeer directly for scale factor instead of using a cached value 2025-12-16 12:23:58 +00:00
reuk
0ba96f15a0
LV2: Use std::optional in more places 2025-12-16 12:23:58 +00:00
reuk
fcf1971122
Plugin Client: Change scaling mechanism on Linux/Windows plugins 2025-12-16 12:23:58 +00:00
reuk
b4c28db765
ComponentPeer: Add method for overriding native scale factor 2025-12-16 12:23:58 +00:00
reuk
6648e13fa6
X11: Ignore ConfigureNotify events containing stale information 2025-12-16 12:03:35 +00:00
reuk
89d019b5da
X11: Load XNextRequest function 2025-12-16 12:03:35 +00:00