Ticket #7 (assigned defect)

Opened 2 years ago

Last modified 5 months ago

cut-and-paste to Qt & GTK apps broken

Reported by: andrewb@… Owned by: dottedmag
Priority: major Component: backend
Version: Keywords:
Cc:

Description

Cutting and pasting from a KDE application to another KDE application, or from an ordinary application to a KDE application doesn't work -- nothing happens on middle click.

Cutting and pasting from a KDE application to an "ordinary" app like xterm works. Also, the selection is always updated (ie. if I select some text in one app, the previous selection is correctly deselected, even if they're both KDE applications on different displays).

I'm running Fedora Core 5 (KDE 3.5.2, Qt 3.3.5, X.org 1.0.1 / X11R7) on both hosts. I'm invoking x2x with: x2x -from :0 -to localhost:10.0 -east -buttonblock

I expect there's something tricky about the way KDE/Qt uses the clipboard; I hope this isn't too hard to fix.

Attachments

qt-fix.diff (2.7 kB) - added by vanto 5 months ago.
qt selection fix

Change History

Changed 2 years ago by mag

Qt people said there is bug in Qt <= 4.0 which lead to similar problems.

Changed 2 years ago by mag

More investigation:

1. Direction of selection transfer does not matter: only toolkits do.

* QT -> anything: ASCII. Everything else changed to '?' * anything -> QT: nothing * GTK -> anything: ASCII. Everything else encoded in Unicode \uXXX sequences. * xterm -> anything: ASCII. Everything else changed to '?'.

Changed 23 months ago by mag

  • summary changed from cut-and-paste to KDE apps broken to cut-and-paste to Qt & GTK apps broken

Changed 10 months ago by Zolan

  • version deleted

I wanted to add to this. I've been using x2x for probably 2 years now between 2 kde machines over an ssh tunnel and only recently after I upgraded one side (my laptop) to kubuntu gutsy from kubuntu feisty that it stopped working (specifically the cut and paste, everything else works as advertised).

This is a MAJOR downer for me as x2x has become one of those tools that I didn't realize I so heavily depended on until it stopped fully working. Is there any suggestions here? I have kubuntu gutsy on the laptop and the machine running x2x is Gentoo running x2x version 1.27.

For the record, I'm not able to get ANY selection to transfer regardless of toolkit or type of selection as stated above by mag.

I would appreciate any help!

Thanks!

Changed 5 months ago by vanto

qt selection fix

Changed 5 months ago by vanto

Here's a patch to fix selection problems with qt/kde apps. The problem was that qt asks for supported selection formats (atom TARGETS) before asking for the actual value. The patch just tells Qt apps some types it supports (UTF8_STRING, STRING, TARGETS) so it actualy asks for the selection value.

Changed 5 months ago by dottedmag

  • owner changed from mag to dottedmag
  • status changed from new to assigned

Thanks! I'm going to apply this patch and make a new release soon, as this bug was real showstopper.

Anyway, code for selection handling needs complete overhaul :( I hope I will find time to update it.

Changed 5 months ago by dottedmag

However this patch still does not work for non-ASCII selection. I'll try to fix it too.

Note: See TracTickets for help on using tickets.