summaryrefslogtreecommitdiff
path: root/src/app-indicator.h
diff options
context:
space:
mode:
authorMikhail Novosyolov <m.novosyolov@rosa.ru>2026-04-28 15:11:59 +0300
committerMikhail Novosyolov <m.novosyolov@rosalinux.ru>2026-04-28 16:01:04 +0300
commit90ce95a6ba93f4f4b2e777041b77e4e7e7e65284 (patch)
tree2b2333754983b565d7683d098d78655ef7158587 /src/app-indicator.h
parent31e8bb083b307e1cc96af4874a94707727bd1e79 (diff)
downloadlibayatana-appindicator-90ce95a6ba93f4f4b2e777041b77e4e7e7e65284.tar.gz
libayatana-appindicator-90ce95a6ba93f4f4b2e777041b77e4e7e7e65284.tar.bz2
libayatana-appindicator-90ce95a6ba93f4f4b2e777041b77e4e7e7e65284.zip
Implement the Activate D-Bus method for primary click handling
Handle the org.kde.StatusNotifierItem Activate() method that KDE Plasma calls on left-click. When a signal handler is connected, emit the "activate" GObject signal and return success. When no handler is connected, return an error so the panel falls back to showing the context menu for backward compatibility. This fixes the dual menu+toggle issue for applications like Onboard that need left-click to perform a custom action instead of showing the context menu. Co-authored-by: Z.AI GLM
Diffstat (limited to 'src/app-indicator.h')
-rw-r--r--src/app-indicator.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app-indicator.h b/src/app-indicator.h
index 059bdbd..7002d35 100644
--- a/src/app-indicator.h
+++ b/src/app-indicator.h
@@ -119,6 +119,7 @@ G_BEGIN_DECLS
#define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed"
#define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path"
#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event"
+#define APP_INDICATOR_SIGNAL_ACTIVATE_EVENT "activate"
/**
* AppIndicatorCategory:
@@ -169,6 +170,7 @@ typedef struct _AppIndicatorClass AppIndicatorClass;
* @new_label: Slot for #AppIndicator::new-label.
* @connection_changed: Slot for #AppIndicator::connection-changed.
* @scroll_event: Slot for #AppIndicator::scroll-event
+ * @activate_event: Slot for #AppIndicator::activate
* @app_indicator_reserved_ats: Reserved for future use.
* @fallback: Function that gets called to make a #GtkStatusIcon when
* there is no Application Indicator area available.
@@ -214,6 +216,11 @@ struct _AppIndicatorClass {
GdkScrollDirection direction,
gpointer user_data);
+ void (* activate_event) (AppIndicator * indicator,
+ gint x,
+ gint y,
+ gpointer user_data);
+
void (*app_indicator_reserved_ats)(void);
/* Overridable Functions */