Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/gui/Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ void Clipboard::clearCopiedText()
if (!m_lastCopied.isEmpty()
&& (m_lastCopied == clipboard->text(QClipboard::Clipboard)
|| m_lastCopied == clipboard->text(QClipboard::Selection))) {
clipboard->clear(QClipboard::Clipboard);
clipboard->clear(QClipboard::Selection);
setText("", false);
#ifdef Q_OS_UNIX
Comment thread
morawskidotmy marked this conversation as resolved.
Outdated
// Gnome Wayland doesn't let apps modify the clipboard when not in focus, so force clear
if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")) {
if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")
&& (m_lastCopied == clipboard->text(QClipboard::Clipboard)
|| m_lastCopied == clipboard->text(QClipboard::Selection))) {
QProcess::startDetached("wl-copy", {"-c"});
}
#endif
Expand Down
Loading