|
From: Daniel J S. <dan...@ie...> - 2006-07-21 08:51:56
|
Good news. I believe I have solved the "sometimes transfers, sometimes d=
oesn't" bug.
I've come back to my original concern, which was the MULTIPLE target. Cu=
rrent CVS gnuplot doesn't address that. It returns None for the property=
. However, documentation says that like TIMESTAMP, MULTIPLE should be ha=
ndled. And properly addressing that (if only partially) seems to have fi=
xed the "sometimes copies, sometimes doesn't" bug.
} else if (reply.xselection.target =3D=3D XA_MULTIPLE) {
Atom *atom =3D &reply.xselection.property;
if (atom[0] =3D=3D None)
reply.xselection.property =3D None;
else {
int i;
for(i=3D0; atom[2*i] !=3D None; i++) {
if (atom[2*i] =3D=3D XA_PRIMARY || atom[2*i] =3D=3D XA_CLIPBOARD)
/* Not completely sure what to do with these requests.
* Swap a buffer, perhaps? Or maybe it is a request
* to go to a global client for copying.
*/
{}
else
/* Setting to None means did not convert target */
atom[2*i] =3D None;
/* Not exactly sure when to end either. */
if (atom[2*i] =3D=3D None || !atom[2*i + 1])
break;
}
}
} else {
(Technically, MULTIPLE can be anything, so really it should be outside th=
e case statement and not one of the cases... can fix later. I don't thin=
k many apps will stuff all their requests into a single multiple.)
So, properly responding to MULTIPLE seems to help. But I don't think I h=
ave it quite yet. What concerns me is this MULTIPLE and its atom PRIMARY=
:
selection request: TARGETS (324) for PRIMARY (1) targets 2
selection request: MULTIPLE (325) for PRIMARY (1)
atom PRIMARY (1) : prop 51527025
atom PRIMARY (1) : prop 51527025
selection request: PIXMAP (20) for PRIMARY (1)
selection request: COLORMAP (7) for PRIMARY (1)
The documentation is very sparse on what exactly this property PRIMARY is=
supposed to be in the context of MULTIPLE. Anyone have any idea? (I'd =
be most grateful!) Is it an address of an existing buffer on the request=
or's window? Does it want the handler to DELETE the PRIMARY buffer? Is =
it so obvious I can't see what it is?
Timoth=E9e, Dave and Bob. Could you please give Patches item #1523316 a =
try if you have time? I'd like your comments.
Dave, are you the "drd" of this comment?
/* drd : export the graph via ICCCM primary selection. well... not quite
* ICCCM since we dont support full list of targets, but this
* is a start. define EXPORT_SELECTION if you want this feature
*/
What are your thoughts on getting rid of this EXPORT_SELECTION on/off var=
iable? My feeling is the mouse/key press route is more X11 convention. =
Also, if we want something like selection when plotting, a "set output cl=
ipboard" could take its place.
Dan
|