Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Tray applet problem: cannot right click on certain tray icons #4946

Closed
gilbertohasnofb opened this issue Dec 17, 2015 · 36 comments
Closed

Comments

@gilbertohasnofb
Copy link

I just upgraded from Linux Mint 17.1 to 17.3 today and while the updated OS looks fantastic, I am experiencing a small but annoying problem with the System Tray applet. Now, when I right click on certain tray icons, I am shown a menu list with "About..." and "Remove this applet" instead of the program options. The main affected program for me is Qjackctl, which is a GUI for the audio driver JACK: basically, if I minimize it, I can't really reopen it since you'd normally do that by right clicking.

@ghost
Copy link

ghost commented Dec 17, 2015

left click to use program options

@gilbertohasnofb
Copy link
Author

This is the thing: certain programs do not respond to left click, and qjackctl is one of them...

@repsac-by
Copy link

Now I have to deploy the program in 2 clicks, first left-click on the icon then I show the window. But if the program has no menu item to show the window, it is not possible to deploy from the system tray. The only way to get it back is disabling the support for the indicators in the “System Settings” -> “General” -> “Enable support for indicators”.

@gilbertohasnofb
Copy link
Author

@repsac-by Ok, I will test that, but what are the downsides of disabling that option? Sorry but I am not familiar with it.

@gilbertohasnofb
Copy link
Author

Ok, I will test that

It works perfectly well, now qjackctl is accessible via the tray icon. Thanks for the tip.

@repsac-by
Copy link

@gilbertohasnofb indicator new type of tray icons. Drawing and processing takes desktop environment. When disabled, the indicators of each application doing it yourself.

@ghost
Copy link

ghost commented Dec 19, 2015

The Indicators are really configurables instead of the old behaviours, and then is possible use the indicators with right click and left click as an option. I know could be a little complex for some people if we have the indicators in the unity desktop way, and as is the unity way and not the cinnamon way, i think this thing need to be configurable, because would affect the custom of the users of cinnamon.

There are some improved to the indicators here:
#4814

Especially, please pay attention to this commit:
lestcape@ab09e94

There are an issue related with open the associate main window when you perform a left click inside the indicator icon, for some indicators.
https://github.com/linuxmint/Cinnamon/blob/master/js/ui/indicatorManager.js#L410

I will try to implement this ability in a better different way, but i can't promise anything yet.

Regards.

@repsac-by
Copy link

@lestcape Thank you, I'm using your improvements. I had a problem with qbittorrent, if you select monochrome icon, it does not appear, although the color icon is displayed.

@ghost
Copy link

ghost commented Dec 19, 2015

@repsac-by yes, probably there are an issue about select the correct icon, but well, I really don't know if what you say is applicable, because one thing is the application-icon and another is the indicator-icon. Are you sure that the icon need to change?

@repsac-by
Copy link

@lestcape
Selecting the icon provides qbittorrent itself (Normal, Monochrome Dark, Monochrome Light). If you choose any different from Normal, instead of the empty space icons. This happens only when the indicators are enabled.

Normal:
q
q1

Monochrome:
q2a
q2

@ghost
Copy link

ghost commented Dec 19, 2015

I see, but sorry i can not reproduced this issue:
https://youtu.be/qQBd6lueets

@repsac-by
Copy link

I rebuilt qbittorrent using qt4 and now all is well. The problem occurs on qt5, which qbittorrent is now the default.

@ghost
Copy link

ghost commented Dec 19, 2015

I don't know where is the correct place to report the issue then. Qt, qbittorrent...? The indicator code can not have a reference to the Qt version, i think. I discover some bugs about tooltips when i test the qBittorrent, so thanks.

@repsac-by
Copy link

But without your improvements icons are displayed in conjunction with qt5

@ghost
Copy link

ghost commented Dec 19, 2015

@repsac-by
Copy link

I removed

&& !this._indicator.isInBlacklist()

restart cinnamon

Nothing has changed, no monochrome icon

@repsac-by
Copy link

I found that the problem in the last commit 233d07f I did git revert and fix it.

@ghost
Copy link

ghost commented Dec 19, 2015

Ok thanks. The last condition is an error anyway. Can you tell me if you see something in your logs files?

~/.xsession-errors and ~/.cinnamon/glass.log

@repsac-by
Copy link

Only this error. When hover is on indicators.

(cinnamon:25743): Cjs-WARNING **: JS ERROR: Error: Expected type utf8 for Argument 'text' but got type 'object'
Tooltip.prototype.set_text@/usr/share/cinnamon/js/ui/tooltips.js:200
Applet.prototype.set_applet_tooltip@/usr/share/cinnamon/js/ui/applet.js:260
MyApplet.prototype._onEnterEvent@/usr/share/cinnamon/applets/[email protected]/applet.js:142

@repsac-by
Copy link

This is causing the problem lestcape@233d07f?diff=unified#diff-05db65ea5625e393ffab82cc7a763e9cR1198

I removed line 1198

style_class: 'applet-icon',

and monochrome icon is visible

@ghost
Copy link

ghost commented Dec 19, 2015

@repsac-by yes i see the same. I will need to get an St.Icon instead of a Clutter.Actor here:

lestcape@233d07f?diff=unified#diff-05db65ea5625e393ffab82cc7a763e9cR1197

@ghost
Copy link

ghost commented Dec 20, 2015

You can test if now is working. I really not test this, any way thanks.

@repsac-by
Copy link

Tested, works fine. Thanks.

@ikuria
Copy link

ikuria commented Dec 25, 2015

sry i have the same problem with my skype qt icon in the cinnamon systray applet, on right click i get "about" and "remove this applet" what can i do to change this?

@repsac-by
Copy link

@ikuria you need to merge master and lestcape-patch-1
Build the package with the cinnamon for your distribution, install it and restart cinnamon.

@ikuria
Copy link

ikuria commented Dec 25, 2015

hmm sadly i dont know how to do that xD

@gilbertohasnofb
Copy link
Author

Strange, my Skype has always worked with the new Systray applet, both before and after disabling the support for the indicators.

@ikuria
Copy link

ikuria commented Dec 25, 2015

gilbertohasnofb do you use skype with sni-qt or without? without i have no problems too, but for the qt tray icons we have no right click, - but now we have with this patch i dont know to install xD

@gilbertohasnofb
Copy link
Author

@ikuria Oh sorry, my bad, I didn't understand you were using sni-qt. No, I don't use it.

@ghost
Copy link

ghost commented Dec 26, 2015

@ikuria an easy way without need to know several things is:

1- Create a backup of this files (just in case):

  • /usr/share/cinnamon/js/ui/dbusMenu.js
  • /usr/share/cinnamon/js/ui/indicatorManage
  • /usr/share/cinnamon/js/ui/main.js
  • /usr/share/cinnamon/applets/[email protected]/applet.js

2- sudo gedit /usr/share/cinnamon/js/ui/dbusMenu.js and replace all the file contents for this:
https://github.com/lestcape/Cinnamon/blob/lestcape-patch-1/js/ui/dbusMenu.js
3- sudo gedit /usr/share/cinnamon/js/ui/indicatorManager.js and replace all the file contents for this:
https://github.com/lestcape/Cinnamon/blob/lestcape-patch-1/js/ui/indicatorManager.js
4- Find and replace this text:

let behavior = global.settings.get_boolean("right-click-indicators");

if you want the left click behaviour by this:

let behavior = true;

or if you want the right click behaviour by this:

let behavior = false;

4- sudo gedit /usr/share/cinnamon/js/ui/main.js and replace all the file contents for this:
https://github.com/lestcape/Cinnamon/blob/lestcape-patch-1/js/ui/main.js

5- sudo gedit /usr/share/cinnamon/applets/[email protected]/applet.js and replace all the file contents for this:
https://github.com/lestcape/Cinnamon/blob/lestcape-patch-1/files/usr/share/cinnamon/applets/systray%40cinnamon.org/applet.js

6- Restart cinnamon.

If you have some problems and you can not come back, then reinstall cinnamon.

Regards.

@ikuria
Copy link

ikuria commented Dec 26, 2015

thanks for the xmas-gift, worked well
one question: skype is not opening in front, is that a problem inside skype or your scriptpatch?

@ghost
Copy link

ghost commented Dec 26, 2015

I update my comment, you need to set:

let behavior = true;

Also see:
There are an issue related with open the associate main window when you perform a left click inside the indicator icon, for some indicators.
https://github.com/linuxmint/Cinnamon/blob/master/js/ui/indicatorManager.js#L410
I say this in this comment:
#4946 (comment)

The real reason is there:

See this:
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem/

"Activate

VOID org.freedesktop.StatusNotifierItem.Activate (INT x, INT y);

Asks the status notifier item for activation, this is typically a consequence of user input, such as mouse left click over the graphical representation of the item. The application will perform any task is considered appropriate as an activation request.

the x and y parameters are in screen coordinates and is to be considered an hint to the item where to show eventual windows (if any)."

As you can read in the reference: "The application will perform any task is considered appropriate as an activation request". What occurs in unity is that they apply a patch in this function to always do what they want. So, this is the reason of this can work ok in unity and not in cinnamon.

Any way is working ok with the version of skype that i have.

@ghost
Copy link

ghost commented Dec 26, 2015

Sorry, with skype, there are a focus problem, but the signal is received. I don't know if this is a problem of muffin, or an skype devs decision.

@ghost
Copy link

ghost commented Dec 26, 2015

Also see that same occurs if we used the equivalent option inside the Skype indicator menu. If the Skype windows don't have the focus then nothing happen.

@ManuelSchneid3r
Copy link

This title is not saying anything about the issue. Please give a precise and concise description of the problem. Please think of the users that are searching a potential duplicate of the issue they want to report and have to open and read all those "I have a problem" issues.

@gilbertohasnofb gilbertohasnofb changed the title System Tray applet problem System Tray applet problem: cannot right click on certain tray icons Jul 29, 2016
@gilbertohasnofb
Copy link
Author

@ManuelSchneid3r 👍

Also, I think this issue can be closed, as it was solved for me long time ago (and apparently for other people in this discussion as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants