Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true.
Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland.
We're limiting the functions to rects with positions and sizes < 1 billion for speed, which is totally fine for most SDL use cases. If you need rectangles larger than that, you can roll your own functions that use 64-bit intermediate values and do proper overflow handling of output values.
Fixes https://github.com/libsdl-org/SDL/issues/8879
src/video/cocoa/SDL_cocoawindow.m
Support Copy in addition to Generic as Drag and Drop operation,
Register and Support public.utf8-plain-text for SDL_EVENT_DROP_TEXT.
* A floating point rectangle contains all points >= x and <= x + w
* A floating point rectangle is only empty if it has negative width. The zero rectangle contains the zero point.
* Adjacent floating point rectangles intersect along their shared side
Fixes https://github.com/libsdl-org/SDL/issues/6791
SDL_BlitSurfaceScaled() is more flexible and uses the SDL_SoftStretch() fast path when possible. Having two surface scaling APIs was confusing, especially when one of them has unexpected limitations.
This was originally to avoid duplicating clipping work in Maelstrom on a 486 computer. This has been confusing for users and computers are a little faster these days, so we'll make it work the way people expect.
Always use the size sent by the compositor when transitioning back to the floating state on the xdg-toplevel path, unless the client explicitly requested a new floating size while the window was in a fixed-size state.
If a window is requested to be maximized or made fullscreen while an uncommitted size request is pending, the surface will first be committed so that the compositor will set the new size when the window is restored.
Fixes the window being wrongly resized when leaving the maximized state in KDE.
This restores the behaviour before 9221548114 where we only preventDefault the event if:
- the key is recognised
- the event is enabled
- the event is not filtered
(ignoring the KEYPRESS special case, which is unchanged)
(cherry picked from commit 6e931bee01)
This more closely matches the mental model of people using SDL, and locking a surface that isn't RLE encoded doesn't cause any issues.
Fixes https://github.com/libsdl-org/SDL/issues/5594
The function can now convert between pixels of different formats, and takes a parameter to control whether the premultiplication is done in sRGB or linear space.
Also added SDL_PremultiplySurfaceAlpha(), which can premultiply the pixels of a surface in-place.
Applying these changes to external code doesn't actually improve anything, and within the context of the other Get* functions for renderers and surfaces, these stand out as outliers, so I'm going to back this change out.
Fixes a type redefinition error:
In file included from /tmp/SDL3/test/../src/events/SDL_events_c.h:28,
from /tmp/SDL3/test/../src/events/SDL_pen.c:26,
from /tmp/SDL3/test/testautomation_pen.c:83:
/tmp/SDL3/test/../src/events/../video/SDL_sysvideo.h:34: error: redefinition of typedef 'SDL_DisplayModeData'
/tmp/SDL3/include/SDL3/SDL_video.h:78: note: previous declaration of 'SDL_DisplayModeData' was here