summary refs log tree commit diff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp

index dcb4be49..5c92fb5b 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -359,6 +359,16 @@ MainWindow::event(QEvent *event) return QQuickView::event(event); } +// HACK: https://bugreports.qt.io/browse/QTBUG-83972, qtwayland cannot auto hide menu +void +MainWindow::mousePressEvent(QMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) { + emit hideMenu(); + } + return QQuickView::mousePressEvent(event); +} + void MainWindow::restoreWindowSize() {