159 |
|
|
160 |
int format; |
int format; |
161 |
Atom type_return; |
Atom type_return; |
162 |
Atom best_target; |
Atom best_target, text_target; |
163 |
Atom *supported_targets; |
Atom *supported_targets; |
164 |
|
|
165 |
STREAM out; |
STREAM out; |
202 |
/* FIXME: We should choose format here based |
/* FIXME: We should choose format here based |
203 |
on what the server wanted */ |
on what the server wanted */ |
204 |
supported_targets = (Atom *) data; |
supported_targets = (Atom *) data; |
205 |
|
best_target = XInternAtom(display, "STRING", False); |
206 |
|
text_target = XInternAtom(display, "TEXT", False); |
207 |
for (i = 0; i < nitems; i++) |
for (i = 0; i < nitems; i++) |
208 |
{ |
{ |
209 |
DEBUG_CLIPBOARD(("Target %d: %s\n", |
DEBUG_CLIPBOARD(("Target %d: %s\n", |
210 |
i, XGetAtomName(display, supported_targets[i]))); |
i, XGetAtomName(display, supported_targets[i]))); |
211 |
|
if (text_target == supported_targets[i]) |
212 |
|
{ |
213 |
|
DEBUG_CLIPBOARD(("Other party supports TEXT, choosing that as best_target\n")); |
214 |
|
best_target = supported_targets[i]; |
215 |
|
} |
216 |
} |
} |
217 |
best_target = XInternAtom(display, "TEXT", False); |
|
218 |
|
|
219 |
|
|
220 |
} |
} |