fix: show slow

By extending the time of returning to the dbus call to occupy more cpu, solve the excessive time caused by insufficient resources.

Task: https://pms.uniontech.com/zentao/task-view-40521.html
Log:
Change-Id: I469c8f846d8de7fb1a7501800f8e041aff3fab1e
Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/8088
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com>
Tested-by: <mailman@uniontech.com>
This commit is contained in:
Zhang, DingYuan 2020-10-20 15:59:08 +08:00 committed by zhangdingyuan
parent 91818b1061
commit 710aba5489
2 changed files with 7 additions and 0 deletions

View File

@ -151,12 +151,18 @@ void MainWindow::callShow()
qApp->setProperty("CANSHOW", true);
launch();
m_callShowEventLoop.exec();
}
void MainWindow::showEvent(QShowEvent *e)
{
QWidget::showEvent(e);
if (m_callShowEventLoop.isRunning()) {
m_callShowEventLoop.quit();
}
// connect(qGuiApp, &QGuiApplication::primaryScreenChanged,
// windowHandle(), [this](QScreen * new_screen) {
// QScreen *old_screen = windowHandle()->screen();

View File

@ -182,6 +182,7 @@ private:
bool m_launched;
QString m_registerKey;
QStringList m_registerKeys;
QEventLoop m_callShowEventLoop;
};
#endif // MAINWINDOW_H