]> git.lyx.org Git - features.git/blobdiff - src/frontends/gtk/GuiClipboard.C
Split clipboard and X selection
[features.git] / src / frontends / gtk / GuiClipboard.C
index 7aecf524ddba0bb147423f94e78a814c725ea056..60895d462d56b7ce114bbfb27311ac6ba38c42b7 100644 (file)
@@ -33,10 +33,11 @@ namespace frontend {
 
 // ENCODING: Gtk::Clipboard returns UTF-8, we assume that the backend
 // wants ISO-8859-1 and convert it to that.
+// FIXME: Wrong!
 string const GuiClipboard::get() const
 {
        Glib::RefPtr<Gtk::Clipboard> clipboard =
-               Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
+               Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
        string const str = Glib::convert_with_fallback(
                        clipboard->wait_for_text(), "ISO-8859-1", "UTF-8");
        lyxerr[Debug::ACTION] << "GuiClipboard::get: " << str << endl;
@@ -46,11 +47,12 @@ string const GuiClipboard::get() const
 
 // ENCODING: we assume that the backend passes us ISO-8859-1 and
 // convert from that to UTF-8 before passing to GTK
+// FIXME: Wrong!
 void GuiClipboard::put(string const & str)
 {
        lyxerr[Debug::ACTION] << "GuiClipboard::put: " << str << endl;
        Glib::RefPtr<Gtk::Clipboard> clipboard =
-               Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
+               Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
        clipboard->set_text(Glib::convert(str, "UTF-8", "ISO-8859-1"));
 }