From b2efe239b6820cb7d4276bbb7882a3ae521a5e84 Mon Sep 17 00:00:00 2001 From: tsic404 Date: Fri, 14 Apr 2023 13:50:08 +0800 Subject: [PATCH] fix: SNI tray menu unable to click when first left click SNI tray menu and app without activate to show, will get a dbus error and recall right menu this will case menu unable to click, move recall to another thread log: fix SNI tray menu unable to click --- frame/window/tray/widgets/snitrayitemwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/window/tray/widgets/snitrayitemwidget.cpp b/frame/window/tray/widgets/snitrayitemwidget.cpp index 955965702..9acefdd25 100644 --- a/frame/window/tray/widgets/snitrayitemwidget.cpp +++ b/frame/window/tray/widgets/snitrayitemwidget.cpp @@ -168,7 +168,7 @@ void SNITrayItemWidget::sendClick(uint8_t mouseButton, int x, int y) // primarily work for apps using libappindicator. reply.waitForFinished(); if (reply.isError()) { - showContextMenu(x,y); + QMetaObject::invokeMethod(this, "showContextMenu", Q_ARG(int,x), Q_ARG(int, y)); } }); }