On 2025-03-31, Travis Shelton wrote: > I did and now the code works. > To disable (at least, partially) the clipboard manager in my system: > go to System Tray Settings (right click in the arrow near the bottom > right corner of the Desktop, then click on `Configure System Tray'), > Entries, System Services, Clipboard. Select `Disabled' and click on > `Apply'. The copy-paste mechanism is still available, but probably the > history and other advanced features are not. After this, the program > still lists a long series of > > Requestor: 0x1e0005b > Denying request of type 'TARGETS' > > but then it waits and doesn't end.
The CLIPBOARD selection is owned by a single program (or none) at a given time. Clipboard managers can steal the CLIPBOARD from the current owner so that, if the current owner terminates, the CLIPBOARD is not lost with it. On 2025-03-31, Travis Shelton wrote: > If I try to paste the string provided by the program (which is the > current time and date): > > Requestor: 0x2c00f16 > Denying request of type 'text/plain;charset=utf-8' > Requestor: 0x2c00f16 > Sending data to window 0x2c00f16, property 'GDK_SELECTION' > > The string is pasted as expected. Referring to the code, I don't > understand why the request of type 'text/plain;charset=utf-8' doesn't > match > > utf8 = XInternAtom(dpy, "UTF8_STRING", False); > > but anyway the request is processed, then. Maybe > 'text/plain;charset=utf-8' corresponds to a slightly different atom? Yes, each target is a different atom. “text/plain;charset=utf-8” is a mimetype, which modern applications often use. But “UTF8_STRING” is also widely supported. Older programs which don't know UTF-8 or mimetypes may use the “STRING” target and encode the selection into Latin-1 or ASCII. On 2025-03-31, Travis Shelton wrote: > Thank you so much! No prob :) I recommend you to read the «§ Client Communication Events» section of the «Xlib - C Language Interface»[1], and the «§ Peer-to-Peer Communication by Means of Selections» section of the ICCCM[2]. The XDG has a few specifications on modern atoms, like the CLIPBOARD selection[3] and the UTF8_STRING target[4]. [1]: https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Client_Communication_Events [2]: https://www.x.org/releases/current/doc/xorg-docs/icccm/icccm.html#Peer_to_Peer_Communication_by_Means_of_Selections [3]: https://www.freedesktop.org/wiki/Specifications/ClipboardsWiki/ [4]: http://www.pps.jussieu.fr/~jch/software/UTF8_STRING -- Lucas de Sena