]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/text/controls.cpp
1. DoSetSize() simplified, DoGetBestSize() introduced
[wxWidgets.git] / samples / text / controls.cpp
index cff2e79bea2d74dea828732a4cb103b1625f4cd0..b9e3bf477702e3fdf9e9e733c2f622466b5717d6 100644 (file)
@@ -450,10 +450,15 @@ void MyPanel::OnPasteFromClipboard( wxCommandEvent &WXUNUSED(event) )
     // parts in wxUSE_DRAG_AND_DROP.
 
 #if wxUSE_CLIPBOARD && wxUSE_DRAG_AND_DROP
+
+    // 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();
+
     if (!wxTheClipboard->Open())
     {
         *m_log << "Error opening the clipboard.\n";
-
         return;
     }
     else