Closed smcv closed 4 months ago
I'm fine with this if @slouken is too.
For sdl2-compat, we would continue to treat it as the wild west, and when you ask for SIZEALL, you get SDL3's new SDL_SYSTEM_CURSOR_GRABBING
.
but it's not obvious to me how you would even want to use "resize in all four directions" in a UI,
This is probably why cdogs_sdl is using this for "grabbing"...despite the SIZEALL name, it usually won't make sense for resizing something, but it makes some sense for "any direction you want to move this thing you are dragging is valid."
Also, if we do this, do we want to pull in GRAB (open hand) and GRABBING (closed hand), and maybe ZOOM_IN and ZOOM_OUT? Those are also listed as CSS cursors, but I don't know what macOS/win32/etc offer in their system icons vs what the browser is providing, to make these worthwhile.
(other ones, like COPY and ALIAS and CELL and such, are probably a bridge too far.)
It doesn't necessarily have to be the entire CSS vocabulary, what I'm mainly interested in is a policy that "each enum value corresponds to something in CSS" (and therefore if people want extra cursors that exist in CSS, they can ask for them, but if they want extra cursors that don't exist in CSS, the answer is much more likely to be no).
Those are also listed as CSS cursors, but I don't know what macOS/win32/etc offer in their system icons vs what the browser is providing
Chromium seems to use IDC_ constants on Windows: https://sources.debian.org/src/chromium/121.0.6167.160-1/ui/base/win/win_cursor_factory.cc/?hl=109#L109
and seems to use system cursors on macOS too: https://sources.debian.org/src/chromium/121.0.6167.160-1/ui/base/cocoa/cursor_utils.mm/
(This doesn't need an sdl2-compat update, as the enum values and meanings of the existing cursors haven't changed, just their names.)
Follow-up for #8939.
On #8939, I wrote:
... but then https://developer.mozilla.org/en-US/docs/Web/CSS/cursor shows it as a 4-pointed arrow that doesn't share its visual metaphor with
copy
oralias
, GNOME's Adwaita theme matches that, and the only actual user of the SDLSIZEALL
cursor that I can find in Debian, https://codesearch.debian.net/show?file=cdogs-sdl_1.5.0%2Bdfsg-1%2Fsrc%2Fcdogsed%2Fcdogsed.c&line=740, seems to expect it to be the equivalent of CSSgrabbing
(a hand with closed fingers holding onto the dragged object). tableflipIs it too late to change the SDL3 version of SDLSystemCursor so that it lines up 1:1 with the CSS vocabulary, which is the closest thing we have to a cross-platform list of cursors? And then UIs that want to represent "user is holding and dragging a thing" could use
SDL_SYSTEM_CURSOR_GRABBING
?This would mean there's no obvious mapping for Windows IDC_SIZEALL, but it's not obvious to me how you would even want to use "resize in all four directions" in a UI, given that the mouse cursor only has 2 degrees of freedom?