From 20fd039e289cbc268f73e878a09993a9908fd751 Mon Sep 17 00:00:00 2001 From: houchengqiu Date: Tue, 15 Oct 2024 14:00:41 +0800 Subject: [PATCH] fix: the command line to show the window picture 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 --- src/main_window.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main_window.cpp b/src/main_window.cpp index 2f32909b..2e389dac 100755 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -1735,11 +1735,6 @@ void MainWindow::topWindow() this->showFullScreen(); this->initResource(); - //wayland 模式下不进入以下步骤 - if (Utils::isWaylandMode) { - return; - } - QJsonObject obj{ {"tid", EventLogUtils::StartScreenShot}, {"version", QCoreApplication::applicationVersion()} @@ -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()