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 1933

Summary: SDL_WM_SetIcon() no longer works in X11
Product: SDL Reporter: Ozkan Sezer <sezeroz>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 1.2   
Hardware: All   
OS: Linux   

Description Ozkan Sezer 2013-06-27 16:26:45 UTC
http://hg.libsdl.org/SDL/rev/ea34ef329509 :
Starting with the HG commit ea34ef329509, SDL_WM_SetIcon() doesn't work
with X11 if called before calling SDL_SetVideoMode() as advised in the
man page. It does work, however, if called after SDL_SetVideoMode().
This is with using SDL-1.2, don't know (and don't yet care about) SDL2.
Commenting out the _NET_WM_ICON src/video/x11/SDL_x11wm.c:X11_SetIcon()
and recompiling brings back the icon. Tested on Fedora 16 (x86_64) and
Fedora 9 (x86).

Looking at the code briefly, _NET_WM_ICON requires an existing window:
if SDL_WM_SetIcon() is called before SDL_SetVideoMode(), we won't have
any window around to change its properties. If the man page is correct
then this seems as a regression against 1.2.15.
Comment 1 Ryan C. Gordon 2013-07-12 01:40:20 UTC
I have removed the _NET_WM_ICON code from SDL 1.2 in hg changeset 14827e7e4d92.

--ryan.