Tdesktop: LMC on tray icon act like RMC

Created on 11 Nov 2017  路  37Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Close Telegram window to tray
  2. Left click on Telegram tray icon

Expected behaviour

Telegram window opens up.

Actual behaviour

The Menu pops up as if right clicked.

Configuration

Operating system:
4.13.11-1-ARCH x86_64

Version of Telegram Desktop:
1.1.23 Installed from AUR.


help wanted linux

All 37 comments

Please try executable from desktop.telegram.org (you can install it from AUR: telegram-desktop-bin)

@stek29 same behavior with telegram-desktop-bin

What DE do you use?

XFCE 4.12

But that's the normal behavior of the status icon. Another thing would be if you are using a DE with support for AppIndicator or KStatusNotifier Item.

@haevalencia this is not a normal behavior. This is first app in my tray, that show menu on left click. All other apps toggle they window(xfce4-terminal, deluge, blueberry, vlc(qt), keepassxc(qt)).

@hxss I will be clearer. This is the _normal behavior_ for the Telegram Desktop status icon.
One of the reasons for GNOME developers to want to remove support from the status icon is that all applications implement it in a different way and therefore behave in a different way.

What about making this behavior changeable by settings?

Isn't it issue related to #3175?

@Felixoid Yes, related. This is about one problem. But #3175 was closed without answer or solution published.

@hxss Really?

john-preston聽closed this issue in聽c1aa1c5聽9 months ago

@auchri What do you mean?

I guess, @hxss means, that issue closed with solution

What solution are you talking about? What I need to do to solve this problem? I'm now use v1.2.1 and LMC still open menu instead toggle window.

I'm sorry, @hxss, it was the wrong mention, I wanted to write "@auchri" =)
And yes, LMC is still working wrong.

I'm have just upgraded telegram-desktop (1.2.6-1 -> 1.2.6-3). Finally, the LMC works as it should.
It's so cool to open and close the telegram window with just one click!
And tray menu now use another fonts and styles than system(not a problem for me 馃檪).
screenshot from 2018-01-10 14-26-32

pacman -Qi telegram-desktop 
Name            : telegram-desktop
Version         : 1.2.8-1

Sequel: RMC returned

That's not official package. Try telegram-desktop-bin from AUR.

The package from the community repo isn't official?

pacman -Ss telegram-desktop
community/telegram-desktop 1.2.8-1 [installed]
    Official Telegram Desktop client

https://www.archlinux.org/packages/community/x86_64/telegram-desktop/

either of telegram-desktop or telegram-desktop-bin work with LMC as RMC

pacman -Qi telegram-desktop-bin
Name            : telegram-desktop-bin
Version         : 1.2.6-1

@DrakeTDL there is source of package, exactly from github releases, and there are patches applied while building.
Maybe this one broke LMC?

@Felixoid in 1.2.6-4 gtk3 libs was returned, so we have again menu by LMC. But when you use 1.2.6-3 or official release - you can't use native Linux notifications.

Also see #922.

TLDR: Having libappindicator-gtk3 installed makes tdesktop use it, and libappindicator doesn't allow to set a custom handler for left mouse click, as far as I know.

Sorry, but uninstalling libappindicator-gtk3 is not a solution for me, this lib is required for haguichi, for example. Maybe you can force tdesktop to ignore this lib (if there is no way to fix the bug)?

@Winterwolf Does haguchi show an icon using that lib? How does its icon handle clicks!

@john-preston yes, it also show context menu on left click.

@Winterwolf Well, tdesktop uses this library as well, so it behaves the same way.

There are several ways tray icon is supported in tdesktop and it is near to impossible to choose the right way in all cases of this huge zoo of Linux DEs and installed libraries.

Currently there are several conditions based on env variables that guide which implementation to prefer, which not to use because it was not working at all in some cases. And libappindicator at least works when it is available, so most of the times it is preferred.

@Winterwolf @john-preston Haguichi listens to scroll events on the indicator, hiding the window when you scroll down and showing it again when scrolling up. It's a bit of a hack around the appindicator limitations in order to keep providing an option to quickly show/hide the window, like you could by clicking on status icons in the old days.

Maybe this would be an option for tdesktop as well. However, not all desktop environments support scroll events on appindicators, and I'm affraid XFCE is one of them...

telegram-desktop 1.2.24-1 works perfect for me now on Arch Linux XFCE! Both tray mouse events and system notifications work!

@hxss because it doesn鈥檛 use libappindicator I guess :(

@stek29 you right. Dont know what is it and for what this pkg. I'm happy now. Only 1 click on tray icon and tg opens/close!

Another step that would seriously decrease the annoyance is to reverse order in this context menu.. right now, if you double click on the tray icon, it opens the menu and selects Quit Telegram.

on fedora 28 telegram-desktop-1.4.3-1.fc28.x86_64 still show menu on LMC. Libappindicator installed but tg doesn't depend from it.

The same problem on Debian sid (unstable) with XFCE 4.14.
Telegram v.1.8.15.
Other applications (Skype (electron based), Viber (qt5), uget (GTK2) and deluge (GTK3)) are have not this issue.
Additional information: appindicator (libappindicator3-1) has been purged deliberately: it does not help.
Please fix this.

More information: when I launch the Telegram with command "env XDG_CURRENT_DESKTOP=NONE telegram-desktop -- %u", LMC works as expected.
But, I guess, that in that case, Telegram switches form D-BUS to XEMBED protocol. So, it is just temporary workaround of this issue: XEMBED is obsolete.

I've made more tests for XFCE DE and Telegram.
I've tested Telegram with different XDG_CURRENT_DESKTOP variables:

$ telegram-desktop
proto: D-BUS, LMC act like RMC;

$ env XDG_CURRENT_DESKTOP=NONE telegram-desktop
proto: XEMBED, LMC act properly;

$ env XDG_CURRENT_DESKTOP=KDE telegram-desktop
proto: D-BUS, LMC act properly;

$ env XDG_CURRENT_DESKTOP=GNOME telegram-desktop
proto: D-BUS, LMC act like RMC.

So, I almost completely sure, that it is Telegram bug (not XFCE bug).

Was this page helpful?
0 / 5 - 0 ratings