mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
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:
parent
91818b1061
commit
710aba5489
@ -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();
|
||||
|
@ -182,6 +182,7 @@ private:
|
||||
bool m_launched;
|
||||
QString m_registerKey;
|
||||
QStringList m_registerKeys;
|
||||
QEventLoop m_callShowEventLoop;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user