Re: Back to copy/paste.
Re: Back to copy/paste.
- Subject: Re: Back to copy/paste.
- From: Nathan <email@hidden>
- Date: Thu, 17 Apr 2008 22:47:48 -0600
On Thu, Apr 17, 2008 at 10:28 PM, Nathan <email@hidden> wrote:
> On Thu, Apr 17, 2008 at 4:43 PM, Harald Hanche-Olsen
> > - Whenever X11 gains focus, the pastboard contents becomes the primary
> > selection. Nothing happens to the clipboard selection.
>
> Oh? If that's true, then that wiki section I quoted above is wrong.
This code, from http://www.x.org/wiki/XDarwin_Clipboard_Code seems to
suggest that both selections are indeed owned by the pasteboard when
X11 gains focus and the clipboard has something new. Of course, the
code could be buggy, but it sure looks like the intent was for the
pasteboard to own them both.
/* Called when X11 becomes active (i.e. has key focus) */
- (void) x_active:(Time)timestamp
{
TRACE ();
if ([_pasteboard changeCount] != _my_last_change)
{
if ([_pasteboard availableTypeFromArray: _known_types] != nil)
{
/* Pasteboard has data we should proxy; I think it makes
sense to put it on both CLIPBOARD and PRIMARY */
XSetSelectionOwner (x_dpy, x_atom_clipboard,
_selection_window, timestamp);
XSetSelectionOwner (x_dpy, XA_PRIMARY,
_selection_window, timestamp);
}
}
}
~ Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden