Skip to content

Commit f220368

Browse files
committed
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection. Github-Pull: bitcoin-core/gui#277 Rebased-From: 7f3a598
1 parent bd2f416 commit f220368

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/qt/guiutil.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,11 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; }
734734

735735
void setClipboard(const QString& str)
736736
{
737-
QApplication::clipboard()->setText(str, QClipboard::Clipboard);
738-
QApplication::clipboard()->setText(str, QClipboard::Selection);
737+
QClipboard* clipboard = QApplication::clipboard();
738+
clipboard->setText(str, QClipboard::Clipboard);
739+
if (clipboard->supportsSelection()) {
740+
clipboard->setText(str, QClipboard::Selection);
741+
}
739742
}
740743

741744
fs::path qstringToBoostPath(const QString &path)

0 commit comments

Comments
 (0)