From 67b4d425680d3d1bde63675935dbb84ff658e634 Mon Sep 17 00:00:00 2001 From: Ye ShanShan Date: Tue, 15 Apr 2025 16:25:29 +0800 Subject: [PATCH] fix: notification show lag It's obvious when the amount of data is large. QTextInput will block to fetch clipboard when it's not readOnly, it will block GUI thread, We send notification after saved to clipboard. pms: BUG-297317 --- src/record_process.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/record_process.cpp b/src/record_process.cpp index f37b702ce..71567b0fc 100644 --- a/src/record_process.cpp +++ b/src/record_process.cpp @@ -824,6 +824,10 @@ void RecordProcess::exitRecord(QString newSavePath) notification.callWithArgumentList(QDBus::AutoDetect, "Notify", arg); qInfo() << __LINE__ << __func__ << "已弹出通知消息"; } + + //保存到剪切板 + save2Clipboard(newSavePath); + if (m_recordType == Utils::kGIF) { QFile::remove(savePath); } @@ -844,8 +848,6 @@ void RecordProcess::exitRecord(QString newSavePath) qInfo() << __LINE__ << __func__ << "录屏计时图标已退出"; } - //保存到剪切板 - save2Clipboard(newSavePath); qInfo() << __LINE__ << __func__ <<"录屏已退出"; QApplication::quit(); if (Utils::isWaylandMode) {