]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textentry.cpp
No real changes, just fix misspellings in comments in wxGTK code.
[wxWidgets.git] / src / gtk / textentry.cpp
index ef3a08bd278419763871f6deeada1414ffa3a34e..d631d5889903477764b06c7be692e76bd5076dbd 100644 (file)
@@ -204,6 +204,16 @@ void wxTextEntry::SetSelection(long from, long to)
     // insertion point is set to the start of the selection and not its end as
     // GTK+ does by default
     gtk_editable_select_region(GetEditable(), to, from);
+
+    // avoid reported problem with RHEL 5 GTK+ 2.10 where selection is reset by
+    // a clipboard callback, see #13277
+    if (gtk_check_version(2,12,0))
+    {
+        GtkEntry* entry = GTK_ENTRY(GetEditable());
+        if (to < 0)
+            to = entry->text_length;
+        entry->selection_bound = to;
+    }
 }
 
 void wxTextEntry::GetSelection(long *from, long *to) const