File tree Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,7 @@ void ProxyPopupWindow::completeWindow() {
2222 this ->updateTransientParent ();
2323}
2424
25- void ProxyPopupWindow::postCompleteWindow () {
26- this ->ProxyWindowBase ::setVisible (this ->mVisible );
27- }
25+ void ProxyPopupWindow::postCompleteWindow () { this ->ProxyWindowBase ::setVisible (this ->mVisible ); }
2826
2927bool ProxyPopupWindow::deleteOnInvisible () const {
3028 // Currently crashes in normal mode, do not have the time to debug it now.
Original file line number Diff line number Diff line change @@ -153,6 +153,14 @@ QPixmap StatusNotifierItem::createPixmap(const QSize& size) const {
153153 return pixmap;
154154}
155155
156+ void StatusNotifierItem::activate () { this ->item ->Activate (0 , 0 ); }
157+
158+ void StatusNotifierItem::secondaryActivate () { this ->item ->SecondaryActivate (0 , 0 ); }
159+
160+ void StatusNotifierItem::scroll (qint32 delta, bool horizontal) {
161+ this ->item ->Scroll (delta, horizontal ? " horizontal" : " vertical" );
162+ }
163+
156164void StatusNotifierItem::updateIcon () {
157165 this ->iconIndex ++;
158166 emit this ->iconChanged ();
Original file line number Diff line number Diff line change 77#include < qobject.h>
88#include < qpixmap.h>
99#include < qtmetamacros.h>
10+ #include < qtypes.h>
1011
1112#include " ../../dbus/dbusutil.hpp"
1213#include " dbus_item.h"
@@ -27,6 +28,10 @@ class StatusNotifierItem: public QObject {
2728 [[nodiscard]] QString iconId () const ;
2829 [[nodiscard]] QPixmap createPixmap (const QSize& size) const ;
2930
31+ void activate ();
32+ void secondaryActivate ();
33+ void scroll (qint32 delta, bool horizontal);
34+
3035 // clang-format off
3136 dbus::DBusPropertyGroup properties;
3237 dbus::DBusProperty<QString> id {this ->properties , " Id" };
Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ bool SystemTrayItem::onlyMenu() const {
8989 return this ->item ->isMenu .get ();
9090}
9191
92+ void SystemTrayItem::activate () { this ->item ->activate (); }
93+
94+ void SystemTrayItem::secondaryActivate () { this ->item ->secondaryActivate (); }
95+
96+ void SystemTrayItem::scroll (qint32 delta, bool horizontal) {
97+ this ->item ->scroll (delta, horizontal);
98+ }
99+
92100SystemTray::SystemTray (QObject* parent): QObject(parent) {
93101 auto * host = StatusNotifierHost::instance ();
94102
Original file line number Diff line number Diff line change @@ -69,13 +69,13 @@ class SystemTrayItem: public QObject {
6969 );
7070
7171 // Primary activation action, generally triggered via a left click.
72- // Q_INVOKABLE void activate();
72+ Q_INVOKABLE void activate ();
7373
7474 // Secondary activation action, generally triggered via a middle click.
75- // Q_INVOKABLE void secondaryActivate();
75+ Q_INVOKABLE void secondaryActivate ();
7676
7777 // Scroll action, such as changing volume on a mixer.
78- // Q_INVOKABLE void scroll(qint32 delta, bool horizontal);
78+ Q_INVOKABLE void scroll (qint32 delta, bool horizontal);
7979
8080 [[nodiscard]] QString id () const ;
8181 [[nodiscard]] QString title () const ;
You can’t perform that action at this time.
0 commit comments