Make X11 selection work correctly (marked text in the ChatWidget now goes into XSelec...
[quassel.git] / src / qtui / chatwidget.cpp
index 85d8cad..6c2da6e 100644 (file)
@@ -411,7 +411,11 @@ void ChatWidget::mouseReleaseEvent(QMouseEvent *event) {
         selectionStart = qMin(dragStartCursor, curCursor);
         selectionEnd = qMax(dragStartCursor, curCursor);
         // TODO Make X11SelectionMode configurable!
         selectionStart = qMin(dragStartCursor, curCursor);
         selectionEnd = qMax(dragStartCursor, curCursor);
         // TODO Make X11SelectionMode configurable!
+#ifdef Q_WS_X11
+        QApplication::clipboard()->setText(selectionToString(), QClipboard::Selection);
+#else
         QApplication::clipboard()->setText(selectionToString());
         QApplication::clipboard()->setText(selectionToString());
+#endif
         break;
       case MarkLines:
         mouseMode = Normal;
         break;
       case MarkLines:
         mouseMode = Normal;