Angus Leeming wrote:
I agree that LyX's interaction with klipper is a PITA. Can you explain the
implications of the changes below? What changes, other than klipper being
happy?

hi angus,

it's really all trial and error (little kid groping in the dark).

as you've noticed i even missed the other wa_ptr's, but my guess is that klipper is hanging there, and that since i've removed the "wa_ptr = this;" it no longer happens...

i think the changes below put the data into the clipboard instead of the mouse selection (setSelectionMode should be false?)

i just don't really understand why selections are so complicated compared to copy and cut's. why not send a signal (with a string) to the frontend on selection. the frontend can then push it to the selection buffer (if it exists). and if a copy or cut follows put the string to the clipboard.

but as said. i am very ignorant (and just waiting for john to flame me... ;-)

regards, ed.


 string const QWorkArea::getClipboard() const
 {
-#if QT_VERSION >= 300
- QApplication::clipboard()->setSelectionMode(true);
-#endif
- QString str = QApplication::clipboard()->text();
+ QString str = QApplication::clipboard()->text(QClipboard::Clipboard );
 if (str.isNull())
 return string();
 return fromqstr(str);

 void QWorkArea::putClipboard(string const & str) const
 {
-#if QT_VERSION >= 300
- QApplication::clipboard()->setSelectionMode(true);
-#endif
- QApplication::clipboard()->setText(toqstr(str));
+ QApplication::clipboard()->setText(toqstr(str),QClipboard::Clipboard );
 }


Reply via email to