WIP. looking for a way to fix a few things to get this working before we can merge it.
- Intended outcome: copies the icon used by window_set_icon() to dialog windows, use xlib default (generic) icon when no icon is set.
- What we currently have: dialog icon gets destroyed and replaced with fully transparent/invisible icon. No idea why.
I don't like duplicating the XSetIconFromSprite function over from the xlib platform into our widget code, but there's not much of a better option when we want this to also be used in SDL but want to avoid SDL depending on xlib when it happens to using Wayland depending on the current session it is running on (when not using widgets).
I also did a test to make sure window_get_icon_index() was returning the correct sprite index and not -1 and it did. So that much can't be the issue. I tried saving the sprite returned by window_get_icon_index() and that gave me an invisible sprite as well (i enabled libpng when doing this). So odddly enough, it just doesn't like the sprite index when it is returned by window_get_icon_index(). O__O
Is it worth merging in it's current state or would you rather me find a solution so the icon matches the one used in the game window? I'd be happier with either one compared to what we have in master, but I still would like to get this issue fixed either way, whether in one pr or two.