Repository navigation
X11: Use SDL_PremultiplyAlpha when creating XcursorImage - #16537
Merged
Merged
Conversation
Like the wayland and the KMSDRM backends already do since b528d48 and 71e9df9 respectively. Problem observed as wrong looking partially transparent cursor on both X11 and XWayland, while it looked correct with SDL_VIDEO_DRIVER=wayland.
Collaborator
|
Merged, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following mouse cursor image used in the Mana client looks partly broken on X11 and XWayland:
Somehow it was only really noticeably wrong for that pick-up hand in the top-right, so for a long time I assumed something was wrong with the image. I've asked Devin (with SWE-2 LLM) to investigate the issue for me, but it found the issue in SDL rather than in the image. Since it noticed this project's AI policy, it has explained the problem and the potential fix to me rather than applying it himself. That's why this time I can check the above box, since I have applied the necessary fix "by hand" and also followed it up with my own small refactor to unduplicate the code.
Description
The X11 backend actually expects pre-multiplied alpha, but a plain
memcpywas used to copy theSDL_Surfacedata over, even though theSDL_Surfacewas not pre-multiplied.The same issue has been fixed previously for other backends in b528d48 and 71e9df9.
Existing Issue(s)
I haven't found an existing issue for this.