taffybar / gtk-sni-tray

A StatusNotifierHost widget written using the gtk+3 bindings for haskell provided by gi-gtk.
BSD 3-Clause "New" or "Revised" License
35 stars 2 forks source link

IBus AppIndicator support #22

Open NickHu opened 4 years ago

NickHu commented 4 years ago

IBus is supposed to support AppIndicators (so long as the environment variable XDG_CURRENT_DESKTOP=KDE is set), however when I run it with

XDG_CURRENT_DESKTOP=KDE ibus-daemon -rxv

I get the following error from gtk-sni-tray-standalone (and also the taffybar module).

Got signal for update type: IconUpdated from unknown sender: Signal {signalPath = ObjectPath "/org/ayatana/NotificationItem/ibus_ui_gtk3", signalInterface = InterfaceName "org.kde.StatusNotifierItem", signalMember = MemberName "NewIcon", signalSender = Just (BusName ":1.209"), signalDestination = Nothing, signalBody = []}
Property update failures [MethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.ServiceUnknown", methodErrorSerial = Serial 77, methodErrorSender = Just (BusName "org.freedesktop.DBus"), methodErrorDestination = Just (BusName ":1.203"), methodErrorBody = [Variant "The name :1.209 was not provided by any .service files"]}]
Failed to identify senderMethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.ServiceUnknown", methodErrorSerial = Serial 78, methodErrorSender = Just (BusName "org.freedesktop.DBus"), methodErrorDestination = Just (BusName ":1.203"), methodErrorBody = [Variant "The name :1.209 was not provided by any .service files"]}
Got signal for update type: IconUpdated from unknown sender: Signal {signalPath = ObjectPath "/org/ayatana/NotificationItem/ibus_ui_gtk3", signalInterface = InterfaceName "org.kde.StatusNotifierItem", signalMember = MemberName "NewIcon", signalSender = Just (BusName ":1.209"), signalDestination = Nothing, signalBody = []}
Property update failures [MethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.ServiceUnknown", methodErrorSerial = Serial 86, methodErrorSender = Just (BusName "org.freedesktop.DBus"), methodErrorDestination = Just (BusName ":1.203"), methodErrorBody = [Variant "The name :1.209 was not provided by any .service files"]},MethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.ServiceUnknown", methodErrorSerial = Serial 88, methodErrorSender = Just (BusName "org.freedesktop.DBus"), methodErrorDestination = Just (BusName ":1.203"), methodErrorBody = [Variant "The name :1.209 was not provided by any .service files"]}]

instead of the system tray icon.

Expected behaviour: I get the IBus system tray icon.

colonelpanic8 commented 4 years ago

@NickHu Yeah, based on this log it looks like ibus-daemon is doing something very strange here. I'll take a look, but basically it seems like it is trying to update its icon without actually registering first.

Any fix would probably need to happen in https://github.com/taffybar/status-notifier-item

I'll try to take a look.

colonelpanic8 commented 4 years ago

Unfortunately it is not all that uncommon for appindicator implementations to do things that are horribly out of spec. I wonder if this will be one of those cases.

NickHu commented 4 years ago

Yeah, I wouldn't be surprised if IBus were doing something wrong. I just got sufficiently annoyed at not being able to use it properly to go investigate, but I'd settle for making xembedsniproxy work too (although perhaps that is harder). Not sure if fcitx/alternatives behave better in this respect - seems like IBus is the "modern" de-facto standard though.

colonelpanic8 commented 4 years ago

@NickHu So I just looked in to this. It looks like what is happening is that ibus just seems to ignore the whole watcher part of the protocol, and it just sends a "hey i have a new icon message" directly to the host. This is definitely out of spec. I'll need to look at their code to figure out exactly what is going on.