lwindolf / liferea

Liferea (Linux Feed Reader), a news reader for GTK/GNOME
https://lzone.de/liferea
GNU General Public License v2.0
816 stars 130 forks source link

1.12-RC1: Tray Icon plugin not working as expected (on KDE & XFCE4) #410

Closed paulgevers closed 1 year ago

paulgevers commented 7 years ago

This is a copy of bug 840193¹ reported in Debian (I have missing dependencies in the Debian package, but once those are fixed, the issue remains).

On the XFCE4 windows manager the following is reported: I can right-click the icon and click the "Show / Hide" menu option and it does what it is supposed to do: hiding the window if shown, show the window if hidden, but left-clicking the icon only ever shows the window but does not hide it.

I myself (on the KDE windows manager) experience the following: I can click on the icon with either right mouse button or left mouse button, but nothing is happening. If I click on the liferea tab in the taskbar while liferea has focus, the tab and the liferea window disappear (as if docked), but I can't restore the window (not even if I call liferea from the command line). I have to "killall liferea" and start it up again to gain access to liferea.

Maybe related, but I get the following warnings when I start-up liferea:

paul@testavoira ~ $ liferea

(liferea:6772): Gtk-WARNING **: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned

(liferea:6772): Gtk-WARNING **: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned

(liferea:6772): Gtk-WARNING **: Failed to get an inhibit portal proxy: The name org.freedesktop.portal.Desktop is not owned

(liferea:6772): Gtk-WARNING **: Allocating size to GtkWindow 0x55c414f502a0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

¹ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840193

paulgevers commented 7 years ago

Even more people report this as not working, all of which are not running GNOME. The list of desktops/window managers where this issue was reported now encompasses KDE, MATE, and XFCE4/XFWM4.

I'd like to help debugging, but have no clue how/where to start. Any hint?

Leiaz commented 7 years ago

For the click on icon behavior, no debugging needed, this was done on purpose in #328. I'm not sure what the "loop bug" is, I preferred the old behavior too.

Your KDE taskbar problem may be due to the plugin hiding the window when it becomes "iconified", but calling Liferea again should show it. For the tray icon, it is a GtkStatusIcon and it is being deprecated, perhaps the KDE tray no longer supports it ?

paulgevers commented 7 years ago

@Leiaz ok, so thank for letting me know that the non-hiding is intended behavior (albeit not desired behavior).

For my KDE situation, it seems the behavior has changed. I no longer see the icon appearing in my taskbar. However, minifying the window by (right) clicking on the Liferea tab in the taskbar shows different behavior with or without the icon plugin enabled. Without plugin enabled, the window is normally minified as any other window. With the plugin enabled, the window is minified and the tab disappears from the taskbar. I don't know how to bring up the window after that, because I don't have anything to click and just starting liferea from the command line shows the tab for nearly a second before disappearing again. The window stays minified.

You may be right about the deprecated icon in KDE, but I don't really know how to check that.

GreenLunar commented 7 years ago

I suggest to add code to the systray plugin that would detect unsupported desktop environments and grey out (i.e. insensitive) the plugin with a message says that plugin is unsupported on current desktop.

@paulgevers Maybe this resource would be of help to you #8043 (Systray icon missing with Plasma 5) – Gajim

lwindolf commented 7 years ago

@GreenLunar Having a DE-detection would be nice. AFAIK there is no common way to do it. For this reason the plugin name has "GNOME classic" in it.

lwindolf commented 7 years ago

@paulgevers The trayicon is the most frustrating thing since GNOME went GnomeShell. It is almost impossible to support. I'm thinking of forming a self-help group of all Linux desktop applications using tray icons :-)

Leiaz commented 7 years ago

I think nowadays we are supposed to use libappindicator.

@paulgevers The plugin "hide" the window when it is iconifyed, the problem is that you don't have a working tray icon to bring it back. It looks like Plasma dropped support for it : http://blog.martin-graesslin.com/blog/2014/03/system-tray-in-plasma-next/

lwindolf commented 7 years ago

@Leiaz libappindicator is only for Unity. Won't work for GNOME shell.

sc0w commented 7 years ago

@asl97 hello, you made https://github.com/lwindolf/liferea/pull/328

what is the original "loop bug" ?

I can't find the issue

can you help us?

asl97 commented 7 years ago

@sc0w IIRC, when you iconify liferea, clicking the icon wouldn't open it. clicking the Show/Hide does nothing as well.

The only way to deiconify liferea was to make clicking the icon to show liferea only or launching liferea again.

It's probably some conflict in window_state_event_cb, would probably require tracking of the states liferea is in to properly fix it.

It would help if I knew how the original embedded trayicon works on liferea.

It was probably related to https://github.com/lwindolf/liferea/issues/75

City-busz commented 7 years ago

My PR fixes the problem: https://github.com/lwindolf/liferea/pull/523