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

This commit is contained in:
JunjieBai 2024-05-15 15:08:44 +08:00 committed by iaom
parent db202c8d41
commit 77f0e52495
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;
}
}