We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1461

Summary: Using a transparent cursor shows as black on Windows
Product: SDL Reporter: buckyballreaction
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P1 CC: g.manu, icculus
Version: HG 2.0Keywords: target-2.0.0
Hardware: x86   
OS: Windows (All)   
Attachments: sample code
Complete C version of test case.

Description buckyballreaction 2012-04-02 19:08:10 UTC
Created attachment 841 [details]
sample code

Using a completely transparent SDL_Cursor shows as black on Windows.

The attached sample code (c++) works well to create a transparent cursor for SDL 1.2, as well as 2.0 on Mac and Linux.
Comment 1 buckyballreaction 2012-04-02 19:11:40 UTC
I forgot to add:  

If I make even one pixel black, the rest of the cursor works as transparent.

Also, I am using hg 6bb657898f55

Thanks!
Comment 2 buckyballreaction 2013-05-22 16:46:53 UTC
This issue is still with the latest revision (53df899db00b).

I used Windows XP SP3 32bit to compile and test a transparent cursor.  It stills shows up as all-black.

I do not actually use a transparent cursor anymore.  I used to use it for disabling the cursor when SDL_ShowCursor(0) was a bit buggy...
Comment 3 Ryan C. Gordon 2013-07-12 11:47:12 UTC
*** Bug 1488 has been marked as a duplicate of this bug. ***
Comment 4 Ryan C. Gordon 2013-07-12 11:48:09 UTC
Bug #1488 is a duplicate of this, but has some good information in the comments. Reminder to check there too before fixing this.

--ryan.
Comment 5 Ryan C. Gordon 2013-07-12 18:52:49 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.0, Priority 1.

This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 6 Ryan C. Gordon 2013-07-20 23:05:32 UTC
Taking this to research. Will throw back to Sam if I get stuck.

--ryan.
Comment 7 Ryan C. Gordon 2013-07-20 23:34:46 UTC
Created attachment 1244 [details]
Complete C version of test case.


Attaching C version of C++ reproduction case, complete with a main(), etc.

--ryan.
Comment 8 Ryan C. Gordon 2013-07-21 00:10:45 UTC
Turns out CreateBitmap(..., NULL) leaves you with an uninitialized cursor mask. Don't know why setting one pixel in the cursor fixed this.

Explicitly setting the mask fixes the issue, which is now done here:

    http://hg.libsdl.org/SDL/rev/30ec6dae748b

(This didn't happen in SDL 1.2 because we used a different API before we supported color mouse cursors.)

Resolving this bug.

--ryan.
Comment 9 buckyballreaction 2013-07-21 01:26:03 UTC
Thanks!

D