mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Don't update global menu on Linux without focus widget
The window loses focus when menu is open and edit options are deactivated
This commit is contained in:
parent
4410aeb3eb
commit
4d997a26b0
1 changed files with 3 additions and 1 deletions
|
@ -568,7 +568,9 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *evt) {
|
||||||
if (qobject_cast<QLineEdit*>(obj)
|
if (qobject_cast<QLineEdit*>(obj)
|
||||||
|| qobject_cast<QTextEdit*>(obj)
|
|| qobject_cast<QTextEdit*>(obj)
|
||||||
|| dynamic_cast<HistoryInner*>(obj)) {
|
|| dynamic_cast<HistoryInner*>(obj)) {
|
||||||
updateGlobalMenu();
|
if (QApplication::focusWidget()) {
|
||||||
|
updateGlobalMenu();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Window::MainWindow::eventFilter(obj, evt);
|
return Window::MainWindow::eventFilter(obj, evt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue