Feuerfuchs / Collapsible-Systray-Cinnamon-Applet

A replacement for the abandoned System Tray Collapsible Cinnamon applet
10 stars 0 forks source link

Icons don't react #40

Closed awsdert closed 2 years ago

awsdert commented 2 years ago

I'm on manjaro cinnamon x64 k5.15 and I using your applet in place of the official applet because the official applet is bugging out in a worse way, it may have caused a crash too, anyways when I added your applet instead the icons show up fine but when I click on them with either left or right button they do nothing, I'm assuming there's an spec change that you need to look into, either that or you've ignored a needed parameter to make them work correctly.

Side note, yes I have removed the official applet from the panel (which is the only one I have, just 1 workspace too)

cailean-d commented 2 years ago

@awsdert Had same issue on manjaro cinnamon v5. I fixed it by replacing icon.click(e); with icon.handle_event(Clutter.EventType.BUTTON_PRESS, e);. Hope it works for you as well.

https://github.com/Feuerfuchs/Collapsible-Systray-Cinnamon-Applet/blob/c3cae79872900fcb882a5da55f5860e47b5ecc2d/collapsible-systray%40feuerfuchs.eu/4.0/applet.js#L800

awsdert commented 2 years ago

I've never edited an applet before, where would I start looking for editable code? Likewise what would I do to compile & install the change?

cailean-d commented 2 years ago

@awsdert for me this applet resides in ~/.local/share/cinnamon/applets/collapsible-systray@feuerfuchs.eu/ directory

file to edit - ~/.local/share/cinnamon/applets/collapsible-systray@feuerfuchs.eu/4.0/applet.js. line 800

applets are made with javascript. so just edit the file and reload the applet or cinnamon itself.

awsdert commented 2 years ago

Ended up switching back to the original which seems to have been fixed, might just be that it's a random trigger for the bug, anyways I found the 2 lines to replace (ty cailean btw, same path for me also) and simply commented them out and slapped the new line underneath them, if I need to switch again I'll see the results then.

awsdert commented 2 years ago

Bug wasn't fixed on the official one after all, switched back to this one, the edits worked a charm.

awsdert commented 2 years ago

I'd put this as an issue but since it's because of my own edits it feels inappropriate to do so, so instead I'm tacking it on here. Do you know how to get the .xsession-errors to show the exact line & character it encountered an error at? All I get is this:

Gjs-Message: 08:10:17.212: JS LOG: [LookingGlass/error] 
[collapsible-systray@feuerfuchs.eu]: unexpected token: identifier
[collapsible-systray@feuerfuchs.eu]: Error importing applet.js from collapsible-systray@feuerfuchs.eu
Gjs-Message: 08:10:17.212: JS LOG: [LookingGlass/trace] 

As you can imagine that is next to useless for finding the error

awsdert commented 2 years ago

Turns out one of the issues I was experiencing with the official tray applet also occurs in this one, where the applet collapses completely with the only way to restore it being remove then re-add the applet. The other issue was over-expansion, where the icons move far to the left and the applet eats up a lot of space on the right of them, haven't seen this applet do that 2nd one yet but I think it's something to bare in mind since it appears to be a bug in xsession/cinnamon itself and it's better to have a workaround to that if you can think of one.