Skip to content

Commit

Permalink
fix: the command line to show the window picture
Browse files Browse the repository at this point in the history
fix the command line to show the window picture

Log: fix the command line to show the window picture
Bug: https://pms.uniontech.com/bug-view-276289.html
  • Loading branch information
starhcq committed Oct 15, 2024
1 parent 57d7d52 commit 20fd039
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1735,11 +1735,6 @@ void MainWindow::topWindow()
this->showFullScreen();
this->initResource();

//wayland 模式下不进入以下步骤
if (Utils::isWaylandMode) {
return;
}

QJsonObject obj{
{"tid", EventLogUtils::StartScreenShot},
{"version", QCoreApplication::applicationVersion()}
Expand Down Expand Up @@ -1814,6 +1809,15 @@ void MainWindow::topWindow()
const auto r = saveAction(screenShotPix);
save2Clipboard(screenShotPix);
sendNotify(m_saveIndex, m_saveFileName, r);

if (Utils::isWaylandMode) {
exitApp();
} else {
QTimer::singleShot(10, [ = ] {
exitApp();
});
}
qInfo() << __FUNCTION__ << __LINE__ << "窗口截图保存流程已完成!";
}

void MainWindow::saveTopWindow()
Expand Down

0 comments on commit 20fd039

Please sign in to comment.