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 - SDL_WM_SetIcon() no longer works in X11
Summary: SDL_WM_SetIcon() no longer works in X11
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: All Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-27 16:26 UTC by Ozkan Sezer
Modified: 2013-07-12 01:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.