[Xquartz-dev] quartz-wm test version Re: Back to copy/paste.
Ben Byer
bbyer at apple.com
Tue Apr 22 16:07:28 PDT 2008
On Apr 22, 2008, at 7:03 AM, Derek Fawcus wrote:
> On Tue, Apr 22, 2008 at 03:42:15PM +0200, Harald Hanche-Olsen wrote:
>> + Harald Hanche-Olsen <hanche at math.ntnu.no>:
>>
>>> Hmm, that seems to have disabled Edit -> Copy altogether,
>>
>> But if I run it with --no-pasteboard, then Edit -> Copy works, and
>> pasteboard and clipboard are synchronized. In fact, to me it works
>> reasonably this way, though it's a safe bet that others will scream
>> bloody murder. What did --no-pasteboard stand for again?
>
> Hmm - I thought that was from my request that there be a way to
> completely
> disable the copy/paste handling in quartz-wm, so that one could
> experiment
> with an external copy/paste daemon.
Umm... heh. That's, um, curious.
I built a new version for you with MACOSX_DEPLOYMENT_TARGET=10.4;
hopefully it will run under Tiger, although you will probably need to
make a symlink from /usr/X11 to /usr/X11R6. If it doesn't work, let
me know, and I'll reinstall Tiger.
http://people.freedesktop.org/~bbyer/binaries/quartz-wm-20080422.bz2
As for "what did --no-pasteboard stand for again?":
int
main (int argc, const char *argv[])
{
NSAutoreleasePool *pool;
int i;
fprintf(stderr,"WARNING: this is an experimental, unsupported
test version of quartz-wm\n");
fprintf(stderr,"Built on 2008/04/21\n");
pool = [[NSAutoreleasePool alloc] init];
focus_follows_mouse = prefs_get_bool (CFSTR (PREFS_FFM),
focus_follows_mouse);
focus_click_through = prefs_get_bool (CFSTR (PREFS_CLICK_THROUGH),
focus_click_through);
limit_window_size = prefs_get_bool (CFSTR (PREFS_LIMIT_SIZE),
limit_window_size);
for (i = 1; i < argc; i++)
{
if (strcmp (argv[i], "--only-proxy") == 0)
_only_proxy = YES;
if (strcmp (argv[i], "--no-pasteboard") == 0)
_no_pasteboard = YES;
else if (strcmp (argv[i], "--synchronous") == 0)
_Xdebug = 1;
else if (strcmp (argv[i], "--help") == 0)
{
printf ("usage: quartz-wm OPTIONS...\n\
Aqua window manager for X11.\n\n\
where OPTIONS... are any of:\n\
--only-proxy Don't manage windows, just proxy\n\
pasteboard between X11 and Cocoa.\n\
--no-pasteboard Don't proxy pasteboard between X11
and Cocoa.\n");
return 0;
}
else
{
printf ("usage: quartz-wm OPTIONS...\n"
"Try 'quartz-wm --help' for more information.\n");
return 1;
}
}
[....]
}
static void
x_init (void)
{
int i;
x_list *node;
x_dpy = XOpenDisplay (NULL);
if (x_dpy == NULL)
{
fprintf (stderr, "can't open default display\n");
exit (1);
}
XSetIOErrorHandler (x_io_error_handler);
x_atom_wm_state = XInternAtom (x_dpy, "WM_STATE", False);
x_atom_wm_protocols = XInternAtom (x_dpy, "WM_PROTOCOLS", False);
x_atom_wm_delete_window = XInternAtom (x_dpy, "WM_DELETE_WINDOW",
False);
x_atom_wm_take_focus = XInternAtom (x_dpy, "WM_TAKE_FOCUS", False);
x_atom_motif_wm_hints = XInternAtom (x_dpy, "_MOTIF_WM_HINTS",
False);
x_atom_native_screen_origin = XInternAtom (x_dpy,
"_NATIVE_SCREEN_ORIGIN", False);
x_atom_native_window_id = XInternAtom (x_dpy,
"_NATIVE_WINDOW_ID", False);
x_atom_clipboard = XInternAtom (x_dpy, "CLIPBOARD", False);
x_atom_text = XInternAtom (x_dpy, "TEXT", False);
x_atom_utf8_string = XInternAtom (x_dpy, "UTF8_STRING", False);
x_atom_targets = XInternAtom (x_dpy, "TARGETS", False);
x_atom_multiple = XInternAtom (x_dpy, "MULTIPLE", False);
x_atom_cstring = XInternAtom (x_dpy, "CSTRING", False);
if (!XShapeQueryExtension (x_dpy, &x_shape_event_base,
&x_shape_error_base))
{
fprintf (stderr, "can't open SHAPE server extension\n");
exit (1);
}
if (!XAppleWMQueryExtension (x_dpy, &x_apple_wm_event_base,
&x_apple_wm_error_base))
{
fprintf (stderr, "can't open AppleWM server extension\n");
exit (1);
}
XineramaQueryExtension (x_dpy, &x_xinerama_event_base,
&x_xinerama_error_base);
if (_only_proxy)
{
XAppleWMSelectInput (x_dpy, AppleWMActivationNotifyMask
| AppleWMPasteboardNotifyMask);
}
else
{
if (_no_pasteboard) {
XAppleWMSelectInput (x_dpy, AppleWMControllerNotifyMask
| AppleWMActivationNotifyMask
| AppleWMPasteboardNotifyMask);
} else {
XAppleWMSelectInput (x_dpy, AppleWMControllerNotifyMask
| AppleWMActivationNotifyMask);
}
XSetErrorHandler (x_init_error_handler);
[...]
So, _no_pasteboard takes out AppleWMPasteboardNotifyMask from the
parameter to XAppleWMSelectInput. It seemed like the easiest way to
disable the feature, but apparently I was wrong?
So what exactly DOES it do? :/
-b
More information about the Xquartz-dev
mailing list