From c893dfd102c6cf07aa7d10d461d5e2ca81034310 Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Thu, 26 Jan 2023 20:34:38 +0800 Subject: [PATCH] chore: limit it to linux wayland --- src/MainWindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5c92fb5b..3fedbdc0 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -363,9 +363,13 @@ MainWindow::event(QEvent *event) void MainWindow::mousePressEvent(QMouseEvent *event) { - if (event->button() == Qt::LeftButton) { - emit hideMenu(); +#if defined(Q_OS_LINUX) + if (QGuiApplication::platformName() == "wayland") { + if (event->button() == Qt::LeftButton) { + emit hideMenu(); + } } +#endif return QQuickView::mousePressEvent(event); }