SFML community forums

Help => Window => Topic started by: Jebbs on October 16, 2012, 11:34:28 am

Title: Icon display at window's creation?
Post by: Jebbs on October 16, 2012, 11:34:28 am
I don't know about other systems, but this happens for me on Windows. Every time I set the window's icon, there is always a delay between when the window is created and when the icon I set to the window actually get's displayed as the application's icon in the taskbar. This isn't a huge deal, but it does bug me a little bit.

Is there anything I can do to have the icon loaded and displaying at the same time the window is created and pops up? Or perhaps this is a problem specific to my computer, as I tried to do a search for this and didn't find anything on the subject.

Thanks very much guys!
Title: Re: Icon display at window's creation?
Post by: eXpl0it3r on October 16, 2012, 11:37:15 am
I don't think you can do much about it. Of course you could try to load the icon before the window gets created, so it doesn't need to load it first fron the disk. But I guess you'll always get a very small delay.
Title: Re: Icon display at window's creation?
Post by: Jebbs on October 17, 2012, 04:20:03 am
That's unfortunate, but I guess if it can't be helped it can't be helped.

I feel like it should be possible to have the window appear with an icon already set though. Maybe I can put it in as a feature request?
Title: Re: Icon display at window's creation?
Post by: Laurent on October 17, 2012, 07:38:52 am
You'll be able to do it with a feature that is already planned: create the window initially hidden. This way you can create the hidden window, set the icon, and show it when everything's ready.
Title: Re: Icon display at window's creation?
Post by: Jebbs on October 17, 2012, 07:49:41 am
Thanks for the reply!

That is pretty awesome that it is in the works! Interestingly enough, I was going to try a similar approach with some experiments in order to come up with a work around though I hadn't had much luck thus far.

Keep up the awesome work!