ENIGMA Development Environment
Website is in read-only mode due to a recent attack.

use same title bar icon for game+dialogs

Reporter: time-killer-games  |  Status: open  |  Last Modified: April 01, 2021, 12:06:38 PM

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).

Observe diagram:


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

@JoshDreamland though this pr is incomplete for reasons given in the pr description, this is still better behavior than what we currently have imo, I like no icon better than zenity/kdialogs default as I dont like the icons they use, but that is more of a personal preference.

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.

Please sign in to post comments, or you can view this issue on GitHub.