-
Notifications
You must be signed in to change notification settings - Fork 14
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
handle click events and modifiers #4
Comments
@vblo: I have been on hiatus regarding Ayatana Indicators for a while. I am slowly coming back and will take a closer look at this. Is it possible that the cause of this issue is not in libayatana-appindicator, but in the renderer (i.e. XFCE indicator plugin, mate-indicator-applet, etc.)? The mate-indicator-applet in Debian recently received a patch for something like your issue: What renderer for Indicators do you use for testing pasystray? Please provide that feedback. Thanks. |
Thanks for your time. I can confirm that my renderer (wmdocker) is not responsible for the issue: the same renderer handles middle-clicks and the ctrl modifier when pasystray uses The problem is that:
I'll try to make a PR so you see what would be needed. |
On Mi 28 Aug 2019 13:34:07 CEST, vblo wrote:
Thanks for your time.
I can confirm that my renderer (wmdocker) is not responsible for the
issue: the same renderer handles middle-clicks and the ctrl modifier
when pasystray uses `GtkStatusIcon` rather than
`libayatana-appindicator`.
Please note that rendering GtkStatusIcon is a completely different
thing from rendering an indicator.
The problem is that:
- `scroll_event` takes as parameter a `GdkScrollDirection` but not a
`GdkModifierType` so there is no way to find out whether the ctrl
key was pressed during the scroll event
- on a middle-click no distinction is made on the modifier keys that
were pressed and the only possible action is to activate the menu
item that was set by a previous call to
`app_indicator_set_secondary_activate_target`
I'll try to make a PR so you see what would be needed.
Ok. Thanks. That will help tremendously. However, the different
renderers (e.g. wmdocker) need to know how to handle that. I need to
check if modifier keys are part of the SNI specs in the first place.
We should not hack stuff in that is not part of the proto standard.
Greets,
Mike
…--
DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: [email protected], http://das-netzwerkteam.de
|
I just checked the specs and it seems that modifier keys are not part of it. However the secondary action can be anything, which would at least implement part of the second item. |
Do you now where I should start if I want to suggest the addition of modifiers handling to the specs? Cheers, |
On Mi 28 Aug 2019 15:11:53 CEST, vblo wrote:
Do you now where I should start if I want to suggest the addition of
modifiers handling to the specs?
Cheers,
Valentin
No, not really. It would have to be adopted by all SNI implementations
out there.
The KDE people started SNI, so maybe they might know which road to
take on this.
Mike
--
DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: [email protected], http://das-netzwerkteam.de
|
Hi Mike, I'm having a deeper look at the source code in order do make my PR, and I have a question. The handling mechanisms for scroll events and that for secondary activate are very different:
is there a particular reason for this? Couldn't the two be handled the same way, i.e.: both through signals or both through setter methods? Thanks, |
@sunweaver would you accept a PR which add supports for this if it an opt in ? there are a ton of reports about this in major electron apps. And now that GTK StatusIcon is gone, libappindicator is the only choice. it is a major draw back in user experience to not be able to differentiate left and right click |
@sunweaver could we get an answer from on you or any other maintainer here? This is really important for any app. |
We're using libayatana-appindicator in https://github.com/Betterbird/thunderbird-patches/ now. For Betterbird/thunderbird-patches#111 we need to react to clicks onto the app indicator (the icon in the systray) which in our case doesn't have a menu. Sadly there is no way to get notified of such clicks. We tried a few things, none were successful.
Sadly we have very little knowledge about all this. In comment #4 (comment) a now deleted user wanted to send a PR, but that hasn't happened. So does anyone now how to gain access to the icon to attach a signal to it. The icon is created here libayatana-appindicator/src/app-indicator.c Line 2032 in f225dcc
but the call at libayatana-appindicator/src/app-indicator.c Line 2028 in f225dcc
seems to be async and we don't know how to get the icon it created. Finally, @easyteacher, you helped us out in Betterbird/thunderbird-patches#20 (comment) after looking at libayatana-appindicator a bit, see issue #62. Maybe you can give us a hint. Update 7th Feb 2023: Fixed wrong code references. |
Im maintainer of a chat application called Gajim, many users ask for the functionality to raise the application on left click, which is not possible right now. |
@sunweaver @tari01 any chance one of you can look at this? This is a real big issues that literally thousands of applications are facing. I know there has been some activity in last months which is why i took the liberty of bumping this |
I opened #71 for this, and it works for my case... But as is, it breaks left click for everyone who didn't attach some specific handler for it. Which was impossible before that PR. Meaning, this change is quite breaking. Need some better idea how to handle it |
this does not work here... is it possible to listen for a secondary click like the middle mouse button? |
Currently,
libayatana-appindicator
only handles scroll events, and shows a menu on left or right click. pasystray uses middle-click for muting and ctrl+scroll/middle-click for volume-change/muting microphone. These work withGtkStatusIcon
, but can't work withlibayatana-appindicator
(see pasystray#44 and pasystray#102). It would be useful to handle and transmit these events so that applications can have specific behaviors on specific actions.The text was updated successfully, but these errors were encountered: