Re: [Usability] clipboard manager comments
- From: Philip Van Hoof <spamfrommailing freax org>
- To: Gnome Clipboard Manager Mailinglist <gcm-devel lists sourceforge net>
- Cc: usability gnome org
- Subject: Re: [Usability] clipboard manager comments
- Date: 16 Oct 2002 19:24:45 +0200
On Wed, 2002-10-16 at 04:11, Gregory Merchan wrote:
> The convention for a unique clipboard is to manage the selection
> CLIPBOARD_MANAGER. The details of this are in the ICCCM. The source
> code of xclipboard (kinda), FVWM, Metacity, any xsettings daemon, any
> freedesktop.org-compliant system tray (e.g., eggtray), and the
> simpleclipbook program (which I showed you) all contain examples of
> of selection managers.
>
> (xclipboard's is actually deficient. IIRC, it doesn't send the appropriate
> ClientMessage to the root window and doesn't support all required targets.)
>
> simpleclipbook and xclipboard used to correctly interact with each other
> and themselves, but the simpleclipbook code was written before Gtk2 stabilized.
> For example, it still uses gdk_send_xevent() which is no longer in the API.
This issue is fixed in cvs, I hope this code does the check correctly :
{
GdkAtom manager = gdk_atom_intern("CLIPBOARD_MANAGER", FALSE);
if (XGetSelectionOwner(gdk_display, (Atom) manager)) {
g_print(_("GCM: another application that does clipboard management
is already running\n"));
exit(0);
} else {
gtk_selection_owner_set (GTK_WIDGET(mwin), manager,
GDK_CURRENT_TIME);
}
}
ps. About the subjects in this thread
I have added some documentation about creating plugins :
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/gcm/gcm-2/doc/plugins.html
And about using libgcm :
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/gcm/gcm-2/doc/libgcm.html
--
Philip van Hoof aka freax (http://www.freax.eu.org)
irc: irc.openprojects.net mailto:me at freax dot org
Go not to the Elves for counsel, for they will say both no and yes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]