Skip to content

Commit 30d3d17

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 ec33867 commit 30d3d17

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/source/mainwindow.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,15 @@ bool MainWindow::handleArguments_Open(const QStringList &listParam)
25922592
qInfo() << "打开文件";
25932593
m_eStartupType = StartupType::ST_Normal;
25942594
// 加载单个压缩包数据
2595-
loadArchive(listParam[0]);
2595+
static bool firstLoad = true;
2596+
if (UiTools::isWayland() && firstLoad) {
2597+
firstLoad = false;
2598+
QTimer::singleShot(200, [this, &listParam]() {
2599+
loadArchive(listParam[0]);
2600+
});
2601+
} else {
2602+
loadArchive(listParam[0]);
2603+
}
25962604

25972605
return true;
25982606
}

0 commit comments

Comments
 (0)