diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-08-26 07:57:46 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-08-26 07:57:46 -0400 |
| commit | 182de083e0fcef0a88b79ea3deee2c04a7ecbd8f (patch) | |
| tree | 054a2bb47ddd97fbe07d2d10fc20bae2a0ac8ffb /main/src/ui/status_notifier_item.vala | |
| parent | b221c865961536dc7391aac5619622f15ae59af8 (diff) | |
feat: close to tray when clicking on tray icon while window is focused
Diffstat (limited to 'main/src/ui/status_notifier_item.vala')
| -rw-r--r-- | main/src/ui/status_notifier_item.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/src/ui/status_notifier_item.vala b/main/src/ui/status_notifier_item.vala index de29509d..70db17d5 100644 --- a/main/src/ui/status_notifier_item.vala +++ b/main/src/ui/status_notifier_item.vala @@ -145,6 +145,12 @@ public class StatusNotifierItem : Object { } public void activate(int x, int y) throws Error { + if (application.window != null && application.window.is_active) { + application.window.visible = false; + activation_token = null; + return; + } + show_window(); } |
