Skip to content

Commit 7d88329

Browse files
committed
fix: Delay archive loading in Wayland to fix dialog positioning
Delay first archive loading by 200ms in Wayland to allow window positioning to complete before showing password dialogs. Prevents dialogs from appearing at (0,0) when opening encrypted archives. Log: fix bug Bug: https://pms.uniontech.com/bug-view-355681.html
1 parent 8bfe0be commit 7d88329

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/source/mainwindow.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,16 @@ bool MainWindow::handleArguments_Open(const QStringList &listParam)
26062606
qInfo() << "打开文件";
26072607
m_eStartupType = StartupType::ST_Normal;
26082608
// 加载单个压缩包数据
2609-
loadArchive(listParam[0]);
2609+
static bool firstLoad = true;
2610+
if (UiTools::isWayland() && firstLoad) {
2611+
firstLoad = false;
2612+
auto path = listParam[0];
2613+
QTimer::singleShot(200, [this, &path]() {
2614+
loadArchive(path);
2615+
});
2616+
} else {
2617+
loadArchive(listParam[0]);
2618+
}
26102619

26112620
return true;
26122621
}

0 commit comments

Comments
 (0)