SFML community forums

Help => Window => Topic started by: Caeous on October 15, 2013, 03:25:40 pm

Title: Black window icon through Remote Desktop
Post by: Caeous on October 15, 2013, 03:25:40 pm
Hello everyone,

I'm getting an issue where if you remote desktop to a Windows XP computer and launch an SFML window with a custom icon loaded, it'll be all black. If you remote desktop from XP to Win 7, the icon is fine.

Here's the code used:

sf::Image icon_bmp;
if( icon_bmp.loadFromFile( path ) )
{
   sf::Vector2u icon_bmp_size = icon_bmp.getSize();
   icon_bmp.createMaskFromColor( sf::Color( 255, 0, 255 ) ); // have tried using with and without
   this->window.setIcon( icon_bmp_size.x, icon_bmp_size.y, icon_bmp.getPixelsPtr() );
}
 

Any ideas?
Title: Re: Black window icon through Remote Desktop
Post by: eXpl0it3r on October 15, 2013, 03:55:04 pm
It's a Remote Desktop issue, most likely not updating the changes correctly or so, besides that it's really a corner case, I mean if you do complex things, you'll have to expect some issues.
Title: Re: Black window icon through Remote Desktop
Post by: Caeous on October 15, 2013, 04:02:27 pm
Yes, it's definitely a corner case, but it would be nice if it could be fixed! It's pretty glaring when you see the black icon. ;)

Would you like me to open up a bug issue for this?
Title: Re: Black window icon through Remote Desktop
Post by: Laurent on October 15, 2013, 04:05:36 pm
Quote
Would you like me to open up a bug issue for this?
I don't think it would be useful, nobody will work on such a specific issue. You'd better try to investigate yourself :-\