Add application tray functionality#857
Conversation
26c4cf2 to
20e2c64
Compare
20e2c64 to
e53e999
Compare
|
Does this add a launch flag for background start of commet? |
|
The current window management implementation already has the option to pass a command line argument I had however completely forgotten about notifications, so I have made a new commit which adds a red badge to the tray icon when there are notifications present. Tray_Notification.mp4This implementation renders a copy of the default application icon with the added badge overlaid on the image. This image then gets cached to the file cache so it is not re-created every time the icon needs to be updated. |
|
Additional linux build requirements: |
|
the 'Open' context menu item doesn't seem to work for me, but might be a wayland issue or something weird with my setup |
There seem to be some related open issues on window_manager: I haven't been able to find a clean fix for this issue. A workaround I found, is to hide the window immediately before restoring/showing it, which would always successfully bring the window to the front. However this would cause the taskbar icon to flash, as the application is briefly removed from it and brought back. This would also cause the taskbar icon to be reordered to the newest position each time 'Open' is selected from the tray context menu, which really is not ideal. In it's current implementation, if 'Minimize on close' is selected from the settings and the application is closed, the 'Open' context menu item would successfully open and bring the window to the front and the standard minimize/show by clicking on the taskbar icon works as usual. The only case where it fails being if the window has been minimized instead of closed, and then opened through the tray icon instead of the taskbar icon. So for now the options I see, are to either keep the current implementation with the bug while selecting 'Open' on the tray icon, implement the workaround which causes taskbar icon reordering, or wait till a better workaround or a fix can be found. |
|
Hi, a quick question regarding the tray feature: Using gnome I the application gets sent to background (but is still in the window overview), and there is no trayicon visible. Is this the expected behavior? |
GNOME has no tray icon functionality built in, similarly to how it has no desktop icons or maximize/minimize buttons by default either. They recently added a "background apps" feature, but it's not really a replacement. You can get tray icons via an extension, such as https://extensions.gnome.org/extension/615/appindicator-support/ |
|
@iobradovi yes, i have installed this extension and it is working eg. with element-desktop, but commet is not showing up. do i need a special config or additional libraries? |
|
this PR has not been merged yet, so it's expected you wouldn't be seeing any tray functionality if you are on latest release |
This adds a new dependency
tray_managerand adds basic tray icon functionality (open/close application) selectable from the tray icon menu. TheMinimize on closesetting's behavior has been changed to hide the application and retain the tray icon, instead of simply minimizing the application. With the previous implementation of minimize on close, there was no option left to exit the application, so this adds a way to exit the application from the tray icon menu without having to kill it with an external task manager. Process signal handlers for SIGINT and SIGTERM have been added, which fixes #842