mirror of https://github.com/procxx/kepka.git
Fix tray icon on macOS in Qt 5.12.5.
This commit is contained in:
parent
85acdbc7ed
commit
28719939a0
|
@ -578,7 +578,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||||
|
|
||||||
// On macOS just remove trayIcon menu if the window is not active.
|
// On macOS just remove trayIcon menu if the window is not active.
|
||||||
// So we will activate the window on click instead of showing the menu.
|
// So we will activate the window on click instead of showing the menu.
|
||||||
if (!active && Platform::IsMac() && false) { // #TODO 5.12.5
|
if (!active && Platform::IsMac()) {
|
||||||
iconMenu = nullptr;
|
iconMenu = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -703,6 +703,9 @@ void MainWindow::handleTrayIconActication(
|
||||||
QSystemTrayIcon::ActivationReason reason) {
|
QSystemTrayIcon::ActivationReason reason) {
|
||||||
updateIsActive(0);
|
updateIsActive(0);
|
||||||
if (Platform::IsMac() && isActive()) {
|
if (Platform::IsMac() && isActive()) {
|
||||||
|
if (trayIcon && !trayIcon->contextMenu()) {
|
||||||
|
showFromTray(reason);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (reason == QSystemTrayIcon::Context) {
|
if (reason == QSystemTrayIcon::Context) {
|
||||||
|
|
Loading…
Reference in New Issue