https://bugs.winehq.org/show_bug.cgi?id=38409
--- Comment #50 from Robert Walker bob.mt.wya@gmail.com --- (In reply to Alexey Min from comment #49)
(In reply to Robert Walker from comment #46)
Tested with vanilla Wine 3.2 and Plasma 5.12.2 on Gentoo GNU/Linux.
@Robert Walker This is how it looks like in Gentoo with xembedsniproxy killed - a separate floating wine tray window appears, with a icon, that what I was talking about. It is annoying, but fully functional :) https://i.imgur.com/C9VRn7d.png
I've tested Steam with Plasma 5 on my Arch and Gentoo installs. The icon sits dumbly there (in the systemtray) but does not respond to any mouse clicks. It's important to note that Plasma 5 compiled with legacy tray support - will attempt to embed the tray icon in an existing displayed system tray... That is what I'm talking about! I.e. a Plasma 5 setup with legacy systemtray support compiled in and enabled, and a Plasma systemtray plasmoid active in the panel (old skool style).
Occasionally embedding fails on my system - then I also get a functional Wine system tray floating about somewhere on the screen... That's some kind of obscure xembed timing bug as far as I can tell... That is not what I am talking about!
13788.054:007c:trace:systray:root_message_handler DBus: message for path [/org/freedesktop/DBus/Local] dest [(null)], intf [org.freedesktop.DBus.Local].[Disconnected]
It just means that we disconnected from DBus.. for some reason :(
It's alright - I've figured out and resolved this issue (with a minor tweak to your patch). I'd stupidly disabled all non systray WINEDEBUG channels - in my posted log. Basically Dbus returned a response that about a non-UTF8 string (which I'd excluded from the log!!)
So I was perpetually downloading a big update for Sleeping Dogs TM - where the TM symbol is a UTF-8 code. This symbol broke your original patch WideCharToMultiByte() call(s). As soon as this download started the Steam systray icon was kicked off Dbus! Converting the toot tip title string to UTF8 appear to resolve that issue (correctly??) and displays the TM symbol as expected.
I'd actually moved on to poking about to see if I can improve other areas of functionality... I think that selecting items in the Steam context menu should also unminimise the main Steam window... Because Steam minimises to the system tray - leaving the panel icon as a useless place holder that doesn't really work properly.
Thoughts? :-)