Previously, it was possible for the Timer destructor to run after the
last ScopeJuceInitialiser_GUI destructor, which meant that timer
callbacks could continue to be fired (via the appDelegate pointer) after
the static appDelegate instance had been destroyed.
With this change in place, we now ensure the Timer is destroyed before
the ScopedJuceInitialiser_GUI.
This fixes an undesired behaviour where squashing the text using
GlyphArrangement::addFittedText would only squash the visible glyphs but
not the additional kerning space between them.
This commit fixes a regression added during the ShapedText based rewrite
of the class. The minimumHorizontalScale parameter was mistakenly
interpreted as an absolute scale, whereas its meaning in the old
implementation was a relative scalar applied to the Font's horizontal
scale.
This is useful on headless Linux systems. When no display is attached,
window creation is bypassed but a StandalonePluginHolder is still
created, allowing audio to be processed.
Previously, MouseSourceState::checkButtonState would trigger a menu item
if the MouseSourceState had observed the mouse button transition from
pressed to released while over an item, after more than 250ms had
elapsed since creating the menu window. In situations where the main
thread was very busy, this timeout could sometimes be reached inside the
same mouse click/release gesture. If the menu was created inside a
mouse-down, then simply tapping the mouse could sometimes trigger an
item from the menu as soon as the menu window appeared.
To help avoid accidentally triggering menu items, the menu window now
prevents any item from being triggered by the mouse until either the
mouse has been released once, or the mouse has moved. Put another way,
if the mouse is initially pressed when the menu is shown, it cannot
trigger a menu item unless the mouse is moved before it is released.
This was evident in the FontsDemo when using the CoreGraphics renderer,
selecting a font without an italic face, and enabling the italic style.
The glyph anchor positions were incorrectly transformed by the text
matrix, causing the left margin of the text to become tilted.
We now correct for the slant and scale specified in the text matrix when
computing glyph anchor positions.
This fixes an issue where Direct2D will emit an error when using dirty
rects on the first full frame after resizing.
The issue isn't present on all hardware/drivers, but was observed on a
Windows 11 computer with a 890M iGPU.
Partially reverts a change made in
362a1cc070.
The factory needs to be multithreading-enabled in order to support e.g.
drawing to the screen on the main thread and drawing to an Image on a
background thread, even when no resources other than the graphics device
are shared between the two threads.
Previously, IDXGISwapChain::Present was called on a background thread,
which made it difficult to avoid race conditions. e.g. during a
live-resize of a window, we would occasionally draw old incomplete
frames instead of new frames at the correct size.
The new approach moves the Present call to the main thread via
AsyncUpdater. We attempt to present whenever the swap event wakes, and
whenever a frame is drawn. Only a single Present call may be made after
the swap event wakes. Subsequent Present calls will be ignored until the
next time the swap event wakes.