fix(frontend):eventFilter处理close事件会阻塞注销.

This commit is contained in:
JunjieBai 2024-05-15 15:08:44 +08:00 committed by iaom
parent 9437a59c12
commit 5e378e96a4
1 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ void MainWindow::ScreenGeometryChanged(QRect rect) {
void MainWindow::centerToScreen(QWidget* widget) {
if(!widget)
return;
KWindowSystem::setState(this->winId(),NET::SkipTaskbar | NET::SkipPager);
KWindowSystem::setState(this->winId(),NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher);
QRect desk_rect = qApp->screenAt(QCursor::pos())->geometry();
int desk_x = desk_rect.width();
int desk_y = desk_rect.height();
@ -446,7 +446,7 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event)
if (event->type() == QEvent::Close) {
event->ignore();
tryHideMainwindow();
return true;
// return true;
}
}