mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
statusnotifier: Handle middle clicks
This commit is contained in:
parent
c3700fdfec
commit
fa57206620
|
@ -101,6 +101,12 @@ void SystemTrayIcon::setContextMenu(QMenu* menu)
|
|||
((SystemTrayIcon*)data)->activated(QSystemTrayIcon::Trigger);
|
||||
};
|
||||
g_signal_connect(statusNotifier, "activate", G_CALLBACK(callbackClick), this);
|
||||
void (*callbackMiddleClick)(StatusNotifier*, gint, gint, gpointer) =
|
||||
[](StatusNotifier*, gint, gint, gpointer data)
|
||||
{
|
||||
((SystemTrayIcon*)data)->activated(QSystemTrayIcon::MiddleClick);
|
||||
};
|
||||
g_signal_connect(statusNotifier, "secondary_activate", G_CALLBACK(callbackMiddleClick), this);
|
||||
|
||||
for (QAction* a : menu->actions())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user