Validation Error: [ VUID-VkImageMemoryBarrier-oldLayout-01212 ] | MessageID = 0xff795e16
vkCmdPipelineBarrier(): pImageMemoryBarriers[0].newLayout (VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) is not compatible with VkImage 0x2160000000216 usage flags VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR|VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR.
The Vulkan spec states: If layouts are not ignored, oldLayout or newLayout is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then image must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set (https://docs.vulkan.org/spec/latest/chapters/synchronization.html#VUID-VkImageMemoryBarrier-oldLayout-01212)
(cherry picked from commit 3df2b1a2a7)
XI_DeviceChanged can have a reason of XISlaveSwitch, which indicates that the valuators need to be updated for the specified device.
(cherry picked from commit b88e540783)
The window may not have keyboard focus when using remote control tools, so drop the keyboard focus requirement. Tested not to regress clickthrough suppression.
(cherry picked from commit 9adf3ff6d3)
The output integer scale may not be re-sent if the display geometry changed, but the scale factor didn't. Cache and restore it on the integer path, to prevent an old value from being used, and possibly rounded to zero if the old value was less than 1.0.
(cherry picked from commit aa5bffa6d3)
Clear the internal X11 clipboard selection data when updating the clipboard during SelectionNotify events, as it is invalid after the update. Otherwise, an out-of-date SelectionRequest can end up attempting to read the invalid data, and cause a crash.
(cherry picked from commit f48fa604b0)
XTranslateCoordinates can generate a BadWindow error if called during a racy reparenting operation, so a non-fatal error handler is required.
(cherry picked from commit 25f4af8fcf)
Register callbacks to listen for IM destruction and instantiation to handle the IME shutting down and restarting during runtime.
(cherry picked from commit 7e8a850246)
Once the lock is released, another thread can clean up the completed
command buffer, return it to the pool and resubmit it with a different
fence before we read d3d12CommandBuffer->inFlightFence, handing the
caller a fence it doesn't own (or NULL).
(cherry picked from commit f443c429c6)
METAL_ReleaseFence cleared the fence's MTLCommandBuffer without holding
submitLock, while METAL_Submit's cleanup loop may still be polling it
through submittedCommandBuffers. It also did so before the DecRef, so
any non-final release broke later waits on a still-owned fence.
(cherry picked from commit d8451e52d5)
Once the lock is released, another thread can clean up the completed
command buffer, return it to the pool and resubmit it with a different
fence before we read metalCommandBuffer->fence, handing the caller a
fence it doesn't own.
(cherry picked from commit 10309e3240)
When handing a SelectionRequest event, XChangeProperty can generate a BadWindow error if the requesting window was already destroyed. Register an error handler to catch this, and prevent it from being fatal.
(cherry picked from commit ec6790bd5e)
This was a pending question from the atomic merge. Not only does this function
need to be called, it needs to be called in the SwapWindow* functions first,
like the legacy (non-atomic) path does.
Reference Issue #16136.
(cherry picked from commit a29eba40a4)
Entering fullscreen and moving the window can be a racy operation on some desktops, and isn't needed when the window is already on the target display, so only do it when necessary.
(cherry picked from commit 2ec0b24b54)
This lets the OS remove windows that were destroyed in cases where we aren't
terminating the process right after calling SDL_Quit(). Otherwise, they'll
stay on the screen, unresponsive.
Apparently there is some animation state that needs to complete, and that is
handled via the runloop.
Fixes#10081.
(cherry picked from commit 4f477c807c)
Skip hit testing when an implicit grab is active, or button raise events may be lost, and the cursor icon may be improperly set if the client reports hit test results while the pointer is outside the window bounds.
(cherry picked from commit bc0a43ec7f)
By putting the WM_TAKE_FOCUS atom in the WM_PROTOCOLS property, SDL
chooses either the "Locally Active" or "Globally Active" input model
depending on the input flag in WM_HINTS.
In order to assist the window manager with making the right decision,
for example, skip this window when choosing what window to activate
next, it will be better if the WM knows right away that the window
accepts or doesn't accept focus (in other words, have either both
the input flag set in WM_HINTS + WM_TAKE_FOCUS or none).
Since the WM_TAKE_FOCUS atom is placed in the WM_PROTOCOLS property, the
WM wanting to adhere to the spec has no choice but send a client message
asking to activate the window and hope for the better.
At quick glance, it appears that the WM_TAKE_FOCUS atom is leftover from
SDL_WINDOWEVENT_TAKE_FOCUS, which was dropped a while ago, and is not
used anymore. So this change removes the WM_TAKE_FOCUS atom to help
window managers such as kwin work better.
(cherry picked from commit 5e8eb0d4e7)
This allows user stick calibration to be applied on JoyCons and possibly
partially user calibrated Pro controllers.
(cherry picked from commit fb8a32cc75)
PPC_FEATURE_HAS_ALTIVEC is not defined by all C libraries. The following
error was raised while testing SDL3 in Buildroot with a PowerPC toolchain
using uClibc-ng:
src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetAltiVecFeatures':
src/cpuinfo/SDL_cpuinfo.c:351:37: error: 'PPC_FEATURE_HAS_ALTIVEC' undeclared (first use in this function)
351 | altivec = getauxval(AT_HWCAP) & PPC_FEATURE_HAS_ALTIVEC;
| ^~~~~~~~~~~~~~~~~~~~~~~
Provide a fallback definition when it is not defined.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
(cherry picked from commit e721af3baf)