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 616

Summary: X11_SetIcon produces distorted icon
Product: SDL Reporter: rainer canavan <sdl>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: 1.2.13Keywords: target-1.2.14
Hardware: Other   
OS: IRIX   
Attachments: output of xdpyinfo on the "bad" machine
screenshot of distorted icon
screensot of the same icon, rendered properly
add default visual to this->hidden->visuals

Description rainer canavan 2008-08-24 08:52:02 UTC
I have 2 SGI O2s which are basically identical. One is running with a default visual with red, green, blue masks of 0xff, 0xff00, 0xff0000, the other with 0xff0000, 0xff00, 0xff. The latter shows distorted icons for all SDL applications.
Comment 1 rainer canavan 2008-08-24 08:53:03 UTC
Created attachment 264 [details]
output of xdpyinfo on the "bad" machine
Comment 2 rainer canavan 2008-08-24 08:54:05 UTC
Created attachment 265 [details]
screenshot of distorted icon
Comment 3 rainer canavan 2008-08-24 08:56:48 UTC
Created attachment 266 [details]
screensot of the same icon, rendered properly

Please note that the 3d beveled frame and text are not part of the SDL-rendered icon, but part of the window manager's design.
Comment 4 rainer canavan 2009-03-29 12:30:12 UTC
Created attachment 310 [details]
add default visual to this->hidden->visuals

X11_SetIcon appears to have problems getting the correct bpp for the default visual of my screen. With larger icons, this causes a segfault somewhere in libX11. Instead of adding the default visual to the internal list, I can work around this problem (both the segfault and the distortion) by setting bpp to 32 before sicon = SDL_CreateRGBSurface(...) in X11_SetIcon, although with this patch, it stays at 24.
Comment 5 Ryan C. Gordon 2009-09-13 16:33:24 UTC
Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.
Comment 6 Sam Lantinga 2009-09-21 02:22:26 UTC
Wow, someone's still using an O2!  I'll look into this, thanks!
Comment 7 Sam Lantinga 2009-09-27 15:41:53 UTC
I added this patch for the next SDL release.  Thanks!