From d0cc8911fdfbfa3b006af8e9d8cb95cbbcad3fc1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Mar 2024 19:35:48 +0100 Subject: [PATCH] Fix comment and call to UsePrimarySelection() in text sample The call actually did nothing, but the comment implied that it did, as if the default argument to UsePrimarySelection() were "true" -- which is not, and never has been, the case. Reduce confusion by clarifying what's going on here and passing an explicit argument. --- samples/text/text.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/text/text.cpp b/samples/text/text.cpp index b197abcde6..bf4d3545d9 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -1315,10 +1315,9 @@ wxTextCtrl *MyPanel::GetFocusedText() const #if wxUSE_CLIPBOARD void MyPanel::SelectClipboardSelection() { - // On X11, we want to get the data from the primary selection instead - // of the normal clipboard (which isn't normal under X11 at all). This - // call has no effect under MSW. - wxTheClipboard->UsePrimarySelection(); + // On X11, we want to exchange data with the clipboard selection instead + // of the primary selection -- which is actually the case by default. + wxTheClipboard->UsePrimarySelection(false); } void MyPanel::DoPasteFromClipboard()