mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
f812f0a1ac
commit
04fac249f9
@ -21,6 +21,7 @@
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QMimeData>
|
||||
#include <QProcess>
|
||||
#include <QTimer>
|
||||
|
||||
#include "core/Config.h"
|
||||
@ -101,6 +102,12 @@ void Clipboard::clearCopiedText()
|
||||
|| m_lastCopied == clipboard->text(QClipboard::Selection)) {
|
||||
clipboard->clear(QClipboard::Clipboard);
|
||||
clipboard->clear(QClipboard::Selection);
|
||||
#ifdef Q_OS_UNIX
|
||||
// Gnome Wayland doesn't let apps modify the clipboard when not in focus, so force clear
|
||||
if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")) {
|
||||
QProcess::startDetached("wl-copy", {"-c"});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
m_lastCopied.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user