diff options
author | ShootingStarDragons <ShootingStarDragons@protonmail.com> | 2023-01-26 20:34:38 +0800 |
---|---|---|
committer | ShootingStarDragons <ShootingStarDragons@protonmail.com> | 2023-01-26 20:34:38 +0800 |
commit | c893dfd102c6cf07aa7d10d461d5e2ca81034310 (patch) | |
tree | 34fda8bee50eb4014cf2e9b69cdc438a3d87283f /src | |
parent | feat: hide all popup menus when press leftbutton on somewhere else (diff) | |
download | nheko-c893dfd102c6cf07aa7d10d461d5e2ca81034310.tar.xz |
chore: limit it to linux wayland
Diffstat (limited to 'src')
-rw-r--r-- | src/MainWindow.cpp | 8 |
1 files 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); } |