Re: Pushing text onto the selection buffer



On Sat, Jul 22, 2000 at 10:20:26PM -0400, Havoc Pennington wrote:
> QClipboard is broken; it always uses the primary selection. GTK could
> use a somewhat simpler clipboard interface, but Qt goes too far in
> this respect and removes important functionality.

As per my other mail, is this something freedesktop.org can address,
given that it affects interoperability between Qt and non-Qt
applications?

> > It might not be a bad idea if GTK+ or GDK were to export
> > "clipboard_atom" and do the
> > 
> > 	clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
> >
> 
> IIRC there is no reason to cache atoms this way, because GTK already
> caches them (i.e. gdk_atom_intern() is plenty fast, and you might as
> well just always call it).

I guess it's less a question of speed than of convenience - widgets or
other code shouldn't need to duplicate the code that gets that atom.

Heck, in the current GTK+ tree that code *is* duplicated - it's in
"gtkeditable.c", "gtktextbuffer.c", and "gtktextview.c", *and* the Win32
code also internalizes "CLIPBOARD" as "gdk_clipboard_atom" so that it
can tell whether you're acting on the clipboard selection or not; I'd be
inclined to have GDK export "gdk_clipboard_atom" directly.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]