mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 12:37:39 +03:00
parent
f812f0a1ac
commit
04fac249f9
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue