chore: limit it to linux wayland

This commit is contained in:
ShootingStarDragons 2023-01-26 20:34:38 +08:00
parent 7d95ac23ce
commit c893dfd102

View file

@ -363,9 +363,13 @@ MainWindow::event(QEvent *event)
void
MainWindow::mousePressEvent(QMouseEvent *event)
{
#if defined(Q_OS_LINUX)
if (QGuiApplication::platformName() == "wayland") {
if (event->button() == Qt::LeftButton) {
emit hideMenu();
}
}
#endif
return QQuickView::mousePressEvent(event);
}