https://bugs.winehq.org/show_bug.cgi?id=38409
--- Comment #57 from Richard H. chain@rpgfiction.net --- (In reply to Tom Englund from comment #56)
(In reply to Robert Walker from comment #54)
Created attachment 62815 [details] wine-vanilla-3.20_implement_dbus_systray.patch
This is a rebased copy of Alexey Min's original patch. I've included some very minimal changes, to add support for UTF-8 tooltip text. Without this support common update notifications, e.g. from Steam game updates, will break the original patch.
NB this patch will also apply cleanly to wine-staging-3.20 (which I tested it on).
hm oddly enough the icon appears and the "tooltip text" shows when mousing over it, but neither left or right clicks does anything. and checking with WINEDEBUG it seems to initialize and register both clicks just fine but no context menu shows :/
4939.841:0025:trace:systray:initialize_dbus Initialize DBUS OK 4939.841:0025:trace:systray:root_message_handler DBus: message for path [/org/freedesktop/DBus] dest [:1.125], intf [org.freedesktop.DBus].[NameAcquired] 4939.841:0025:trace:systray:connect_dbus DBus: connected to SESSION bus as ':1.125'. 4939.841:0025:trace:systray:is_statusnotifier_host_running DBus: detected that org.kde.StatusNotifierWatcher present, will ask him about StatusNotifierHost! 4939.841:0025:trace:systray:is_statusnotifier_host_running DBus: OK: Got prop.get reply, IsStatusNotifierHostRegistered = 1 4939.841:0025:trace:systray:can_use_dbus_sni_systray DBus: detected that we can use DBus systray instead of XEmbed 4939.841:0025:trace:systray:add_sni_icon id=0x0, hwnd=0x100a0 4939.842:0025:trace:systray:assign_tray_icon_data fIcon = 1, (hotspot 8, 8) mask = 0x1005f, color = 0x1005e 4939.842:0025:trace:systray:assign_tray_icon_data System icon size: 32 x 32 4939.842:0025:trace:systray:assign_tray_icon_data Got color bitmap: bmType = 0 4939.842:0025:trace:systray:assign_tray_icon_data size = 16 x 16 4939.842:0025:trace:systray:assign_tray_icon_data scanline bytes = 64 4939.842:0025:trace:systray:assign_tray_icon_data color planes = 1 4939.842:0025:trace:systray:assign_tray_icon_data bits per pixel = 32 4939.842:0025:trace:systray:assign_tray_icon_data bits pointer = 0x630000 4939.842:0025:trace:systray:assign_tray_icon_data Saved icon bitmap, 1024 bytes 4939.842:0025:trace:systray:start_dbus_thread started dbus_thread 4939.842:0025:trace:systray:add_sni_icon Requesting name [org.kde.StatusNotifierItem-41-0]... 4939.842:0025:trace:systray:add_sni_icon Request name [org.kde.StatusNotifierItem-41-0] OK! 4939.842:0025:trace:systray:add_sni_icon Using [wine] as application name 4939.842:0073:trace:systray:root_message_handler DBus: message for path [/org/freedesktop/DBus] dest [:1.125], intf [org.freedesktop.DBus].[NameAcquired] 4939.842:002a:trace:systray:Shell_NotifyIconW dwMessage = 4, nid->cbSize=956 4940.143:0073:trace:systray:root_message_handler DBus: message for path [/StatusNotifierItem] dest [org.kde.StatusNotifierItem-41-0], intf [org.freedesktop.DBus.Properties].[GetAll] 4940.143:0073:trace:systray:root_message_handler DBus: Properties.GetAll( "org.kde.StatusNotifierItem" ) 4940.143:0073:trace:systray:root_message_handler Propgetall reply for icon org.kde.StatusNotifierItem-41-0 4946.750:0073:trace:systray:root_message_handler DBus: message for path [/StatusNotifierItem] dest [org.kde.StatusNotifierItem-41-0], intf [org.kde.StatusNotifierItem].[Activate] 4946.750:0073:trace:systray:root_message_handler org.kde.StatusNotifierItem:Activate() 4946.750:0073:trace:systray:relay_windows_message DBus: relaying 0x201 4946.751:0073:trace:systray:relay_windows_message DBus: relaying 0x202 4947.384:0073:trace:systray:root_message_handler DBus: message for path [/StatusNotifierItem] dest [org.kde.StatusNotifierItem-41-0], intf [org.kde.StatusNotifierItem].[ContextMenu] 4947.384:0073:trace:systray:root_message_handler org.kde.StatusNotifierItem:ContextMenu() 4947.384:0073:trace:systray:relay_windows_message DBus: relaying 0x204 4947.384:0073:trace:systray:relay_windows_message DBus: relaying 0x205
I can totally confirm this. BUT it's not consistent. "Sometimes" it just works. Sometimes the Icon just is "dead". I don't know how to reproduce it, however.