Skip to content

Commit

Permalink
fixed freeze with copy URL to clipboard (flameshot-org#2348)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8954e0d)
  • Loading branch information
borgmanJeremy authored and Yuriy Puchkov committed May 13, 2022
1 parent 9c9730f commit 904018f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/flameshotdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ void FlameshotDaemon::attachScreenshotToClipboard(const QByteArray& screenshot)

void FlameshotDaemon::attachTextToClipboard(QString text, QString notification)
{
// Must send notification before clipboard modification on linux
if (!notification.isEmpty()) {
AbstractLogger::info() << notification;
}

m_hostingClipboard = true;
QClipboard* clipboard = QApplication::clipboard();

Expand All @@ -240,9 +245,6 @@ void FlameshotDaemon::attachTextToClipboard(QString text, QString notification)
// windows for some reason
m_clipboardSignalBlocked = true;
clipboard->setText(text);
if (!notification.isEmpty()) {
AbstractLogger::info() << notification;
}
clipboard->blockSignals(false);
}

Expand Down

0 comments on commit 904018f

Please sign in to comment.