fix(frontend):eventFilter处理close事件会阻塞注销.
This commit is contained in:
parent
db202c8d41
commit
77f0e52495
|
@ -268,7 +268,7 @@ void MainWindow::ScreenGeometryChanged(QRect rect) {
|
||||||
void MainWindow::centerToScreen(QWidget* widget) {
|
void MainWindow::centerToScreen(QWidget* widget) {
|
||||||
if(!widget)
|
if(!widget)
|
||||||
return;
|
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();
|
QRect desk_rect = qApp->screenAt(QCursor::pos())->geometry();
|
||||||
int desk_x = desk_rect.width();
|
int desk_x = desk_rect.width();
|
||||||
int desk_y = desk_rect.height();
|
int desk_y = desk_rect.height();
|
||||||
|
@ -446,7 +446,7 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||||
if (event->type() == QEvent::Close) {
|
if (event->type() == QEvent::Close) {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
tryHideMainwindow();
|
tryHideMainwindow();
|
||||||
return true;
|
// return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue