Running under Gnome, calling ComponentPeer::forceSetBounds immediately
after creating a new peer causes the peer to emit a visibility-changed
event because the window manager sometimes reports that the new window
is in IconicState.
_NET_WM_STATE_HIDDEN seems to more accurately reflect whether the window
is really minimised or off-screen.
When using RDP to access a Fedora machine running Gnome, the only
available colourmap is 32-bit. The old implementation caused GUI apps to
crash when they attempted to use a null colourmap pointer.
Previously opening a PopupMenu and then clicking somewhere outside
the application would cause the mouse button representation to be
stuck in a down state.
In 6f3fb5a29f windowBorder member of
LinuxComponentPeer was changed to mean the logical size of the border
that is independent of the current scale factor. This was done to fix a
bug and make it consistent with the bounds member, which is also
independent from the scale factor.
This change wasn't taken into account in XWindowSystem::setBounds()
causing a positioning bug.
In CoreGraphicsPixelData::createImage, image data was copied from a
BitmapData created from the Image passed into the function.
The BitmapData instance didn't keep track of the size of the buffer it
pointed to, so the buffer size was computed by multiplying the
BitmapData height by its line stride. However, if the BitmapData pointed
to a subsection of an image, the `data` pointer might be offset from
the allocated region, and `data + lineStride * height` would point past
the end of the allocated region. Trying to read/copy this range would
cause a heap buffer overflow at the end of the range.
This change adjusts BitmapData so that it keeps track of the size of the
allocated region. Taking a subsection of an image should subtract the
data pointer offset from the size of the allocated region.
The bug was triggered on Monterey where a pressure of 1 is reported
while a mouse button is being held down. This caused an extra drag
event being triggered between mouse down and up events, even if no
movement occurred.
This new factoring is a bit more typesafe, as it avoids casting
internals to void*.
It also allows cursors to scale appropriately on high resolution
displays on Windows.
Previously, BadMatch errors were seen when there were several modal
windows, each with a native titlebar. Moving a window would attempt to
restack the windows, which was not possible because the JUCE windows
were not siblings. We actually need to restack the top level windows,
i.e. the windows containing the server-side decorations.
This resolves a regression which was introduced in
74ca3b44c4.
Prior to that commit, drag and drop on Linux/X11 worked as expected.
DragAndDropContainer::performExternalDragDropOfFiles allowed dropping
files onto other applications.
After the faulty commit, this function may cause the window manager to
enter a bad state in which the drag operation never finishes, making it
impossible to switch between windows or close windows.
I think the issue happens because the DnD source may receive (spurious?)
XdndLeave messages during the drag, which cause the peer's entry in the
dragAndDropStateMap to be removed. Before the faulty commit, each peer
had its own drag and drop state object, which was not destroyed in this
way.
This change will keep the peer's drag state object alive, even when an
XdndLeave message is received. The entry will still be removed when the
peer's window is destroyed.
Previously, things like PopupMenus which were created in their own
windows were not being scaled correctly on HiDPI displays on Linux.
This patch forces the display scale to 1.0 in plugins, meaning that
the transform applied to the main plugin window is the sole source
of truth for component scaling in plugins.