1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules
reuk ad5a755b10
Viewport: Avoid stack overflows when displaying transformed content components
For some transforms, the program could get stuck in the following loop:
- The content component emits a resized/moved notification, leading to
  the initial call to Viewport::updateVisibleArea.
- New positions are computed for the viewport scrollbars, and scrollbar
  listeners are notified synchronously that the scrollbars have been
  updated.
- The viewport itself listens to the scrollbars, so it receives a
  notification and updates the position of the content component.
- The scrollbar position (quantised to an integer) resolves to a
  component position (also quantised to an integer) that differs from
  the existing position, so the new position is applied.
- The viewport now attempts to set the scrollbars to the correct
  position in response, and notifies listeners that the scrollbars
  have moved...

Normally, the recursion would exit at the point where the component position
is set to its current position. If we're unlucky, though, converting
from view pos to scrollbar pos, then scrollbar pos back to view pos may
result in a view pos that differs from the original value.

This fix adds a new exit condition from the recursion. On receiving a
scrollbar move notification, we check whether the scrollbar position
computed from the current view position matches the incoming scrollbar
position. If it does, there's no need to compute and apply a new view
position from the incoming scrollbar position.
2024-10-02 11:35:38 +01:00
..
juce_analytics Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_animation Fix some Doxygen docstrings 2024-06-12 09:35:32 +01:00
juce_audio_basics Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_audio_devices Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
juce_audio_formats Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_audio_plugin_client VST3 Client: Fix drifting and growing windows due to inaccurate constrainer operations 2024-10-01 13:53:25 +02:00
juce_audio_processors VST3 Host: Fix growing windows due to inaccurate coordinate operations 2024-10-01 13:53:25 +02:00
juce_audio_utils Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
juce_box2d Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_core BigInteger: Fix implementation of exponentModulo 2024-09-30 20:37:43 +01:00
juce_cryptography Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_data_structures Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_dsp Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
juce_events Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
juce_graphics DirectWrite: Return styles in the order reported by the system 2024-10-02 11:35:38 +01:00
juce_gui_basics Viewport: Avoid stack overflows when displaying transformed content components 2024-10-02 11:35:38 +01:00
juce_gui_extra Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
juce_midi_ci Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_opengl Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_osc Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_product_unlocking Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
juce_video Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
CMakeLists.txt Animation: Add juce_animation module 2024-04-16 17:43:21 +01:00