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 1919 - Window icon disappears as soon as a renderer is created
Summary: Window icon disappears as soon as a renderer is created
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P1 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.0
Depends on:
Blocks:
 
Reported: 2013-06-17 03:56 UTC by Sebastian
Modified: 2013-07-27 05:28 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 Sebastian 2013-06-17 03:56:48 UTC
Setting a window icon works just fine until a renderer is added to the window.
After adding the renderer the icon disappears.

Reproduce by:
- Take the example code from the wiki: http://wiki.libsdl.org/moin.fcg/SDL_SetWindowIcon

- Add the following two lines after  SDL_FreeSurface(surface);
  SDL_Delay(1000);
  SDL_Renderer* ren = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

-compile and run

You will see the window icon correctly at first. After the Delay the Icon will disappear.

I have tested this with the current HG on Linux 64bit.
Comment 1 Sam Lantinga 2013-06-19 04:25:02 UTC
Ah, I know what's going on here.  The renderer is recreating the window for an OpenGL context and SDL isn't copying the icon over to the new window.
Comment 2 Ryan C. Gordon 2013-07-12 18:52:55 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 3 Sam Lantinga 2013-07-27 05:03:03 UTC
What window manager are you seeing this with?  I'm not able to reproduce it with Unity.
Comment 4 Sam Lantinga 2013-07-27 05:28:06 UTC
Nevermind, I can reproduce it here on Linux Mint.

Fixed, thanks!
http://hg.libsdl.org/SDL/rev/9e9ab1dc3811