Re: Back to copy/paste.
Re: Back to copy/paste.
- Subject: Re: Back to copy/paste.
- From: Harald Hanche-Olsen <email@hidden>
- Date: Fri, 18 Apr 2008 06:55:28 +0200 (CEST)
+ Ben Byer <email@hidden>:
> On Apr 17, 2008, at 3:43 PM, Harald Hanche-Olsen wrote:
>
> > This is confusing: You just finished explaining that the X11
> > selections are POINTERS, not COPIES. So copying something to these
> > non-copies is nonsensical. Surely, what must happen is that some X
> > client claims ownership of the primary and clipboard selections?
> > (I presume that client is quartz-wm, though xlsclients does not list
> > quartz-wm as a client. Hidden by magic?)
> >
>
> Dunno about the magic part -- not that I know of
Hmm. I see from lsof that quartz-wm has a connection to
/tmp/.X11-unix/X0 ... how it avoids being visible to xlsclients I
don't know. But never mind for now, that's not important.
> -- but for you and anyone else who is interested, I put the current
> quartz-wm (!!!) code ... for copy/paste ... up at
> http://www.x.org/wiki/XDarwin_Clipboard_Code.
Great! I have a busy day ahead of me, so cannot study it in detail
now, but I notice one thing:
/* Called when the Edit/Copy item on the main X11 menubar is selected
and no appkit window claims it. */
- (void) x_copy:(Time)timestamp
{
[...]
if (w != None && w != _selection_window)
{
XSetSelectionOwner (x_dpy, x_atom_clipboard,
_selection_window, timestamp);
_my_last_change = [_pasteboard declareTypes:_known_types owner:self];
_proxied_selection = XA_PRIMARY;
}
[...]
}
But when _proxied_selection has been changed to XA_PRIMARY, it can
never change back, because the only other place it is changed is here:
/* Called when X11 loses key focus */
- (void) x_inactive:(Time)timestamp
{
[...]
if (_proxied_selection == XA_PRIMARY) /* <------ Notice this */
return;
[...]
if (w != None && w != _selection_window)
{
[...]
_proxied_selection = x_atom_clipboard; /* <------ won't happen */
}
}
- Harald
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden