Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Icon display at window's creation?  (Read 1928 times)

0 Members and 1 Guest are viewing this topic.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Icon display at window's creation?
« 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!
DSFML - SFML for the D Programming Language.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Icon display at window's creation?
« Reply #1 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.
« Last Edit: October 16, 2012, 11:42:09 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: Icon display at window's creation?
« Reply #2 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?
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Icon display at window's creation?
« Reply #3 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.
Laurent Gomila - SFML developer

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: Icon display at window's creation?
« Reply #4 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!
DSFML - SFML for the D Programming Language.