Skip to content

Commit

Permalink
fix: when dde-file-manager closed, session info would no be recorded
Browse files Browse the repository at this point in the history
in dde-file-manager -d process, window is hidden

Log: when dde-file-manager closed, session info would no be recorded
Bug: https://pms.uniontech.com/bug-view-230871.html
  • Loading branch information
max-lvs committed Dec 1, 2023
1 parent 375fbca commit 5319570
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/apps/dde-file-manager/sessionloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void SessionBusiness::onWindowOpened(quint64 windId)
auto window = FMWindowsIns.findWindowById(windId);
Q_ASSERT_X(window, "WindowMonitor", "Cannot find window by id");

if (getAPI()->isInitialized()) {
if (!window->isHidden() && getAPI()->isInitialized()) {
getAPI()->connectSM(window->winId());
getAPI()->setWindowProperty(window->winId());
}
Expand All @@ -160,5 +160,7 @@ void SessionBusiness::onCurrentUrlChanged(quint64 windId, const QUrl &url)
auto window = FMWindowsIns.findWindowById(windId);
Q_ASSERT_X(window, "WindowMonitor", "Cannot find window by id");

savePath(window->winId(), url.toString());
if (!window->isHidden()) {
savePath(window->winId(), url.toString());
}
}

0 comments on commit 5319570

Please sign in to comment.