The XQuartz option was meant mainly for RECORD. I'll followup later to add a preference option for RECORD in XQuartz.
Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> --Jeremy > On Nov 23, 2015, at 18:13, Keith Packard <[email protected]> wrote: > > Keith Packard <[email protected]> writes: > > Here's a patch, which first splits out the command line and config file > options for XTEST and RECORD, and then disables RECORD by default but > leaves XTEST enabled by default. > > From 2f1872f518ca7640efc42870800536f8e45c4b23 Mon Sep 17 00:00:00 2001 > From: Keith Packard <[email protected]> > Date: Mon, 23 Nov 2015 14:49:33 -0800 > Subject: [PATCH xserver] Allow RECORD and XTEST to be controlled separately > > RECORD and XTEST were both controlled by the -tst server option and > XTEST extension selection. Split these out and then make RECORD be > disabled by default. > > Signed-off-by: Keith Packard <[email protected]> > --- > hw/xquartz/X11Application.m | 8 ++++---- > include/globals.h | 5 ++++- > mi/miinitext.c | 9 ++++++--- > os/utils.c | 20 +++++++++++++++++--- > 4 files changed, 31 insertions(+), 11 deletions(-) > > diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m > index d2c5d30..1348480 100644 > --- a/hw/xquartz/X11Application.m > +++ b/hw/xquartz/X11Application.m > @@ -82,7 +82,7 @@ static dispatch_queue_t eventTranslationQueue; > #endif > #endif > > -extern Bool noTestExtensions; > +extern Bool noXTestExtension; > extern Bool noRenderExtension; > extern BOOL serverRunning; > > @@ -901,7 +901,7 @@ cfarray_to_nsarray(CFArrayRef in) > darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH > default :darwinDesiredDepth]; > > - noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS > + noXTestExtension = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS > default :FALSE]; > > noRenderExtension = ![self prefs_get_boolean:@PREFS_RENDER_EXTENSION > @@ -1592,7 +1592,7 @@ handle_mouse: > } > } > > - if (!XQuartzServerVisible && noTestExtensions) { > + if (!XQuartzServerVisible && noXTestExtension) { > #if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0 > /* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, > so we can't call xp_find_window from the Appkit thread */ > xp_window_id wid = 0; > @@ -1695,7 +1695,7 @@ handle_mouse: > /* If we're in the background, we need to send a MotionNotify event > * first, since we aren't getting them on background mouse motion > */ > - if (!XQuartzServerVisible && noTestExtensions) { > + if (!XQuartzServerVisible && noXTestExtension) { > bgMouseLocationUpdated = FALSE; > DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, > location.x, location.y, > diff --git a/include/globals.h b/include/globals.h > index 858c9a3..42f21ce 100644 > --- a/include/globals.h > +++ b/include/globals.h > @@ -23,7 +23,10 @@ extern _X_EXPORT int monitorResolution; > extern _X_EXPORT int defaultColorVisualClass; > > extern _X_EXPORT int GrabInProgress; > -extern _X_EXPORT Bool noTestExtensions; > +extern _X_EXPORT Bool noXTestExtension; > +#ifdef XRECORD > +extern _X_EXPORT Bool noRecordExtension; > +#endif > extern _X_EXPORT char *SeatId; > extern _X_EXPORT char *ConnectionInfo; > extern _X_EXPORT sig_atomic_t inSignalContext; > diff --git a/mi/miinitext.c b/mi/miinitext.c > index 5fc44e3..a089a2c 100644 > --- a/mi/miinitext.c > +++ b/mi/miinitext.c > @@ -149,6 +149,9 @@ static ExtensionToggle ExtensionToggleList[] = { > #ifdef RANDR > {"RANDR", &noRRExtension}, > #endif > +#ifdef XRECORD > + {"RECORD", &noRecordExtension}, > +#endif > {"RENDER", &noRenderExtension}, > #ifdef XCSECURITY > {"SECURITY", &noSecurityExtension}, > @@ -179,7 +182,7 @@ static ExtensionToggle ExtensionToggleList[] = { > #ifdef XSELINUX > {"SELinux", &noSELinuxExtension}, > #endif > - {"XTEST", &noTestExtensions}, > + {"XTEST", &noXTestExtension}, > #ifdef XV > {"XVideo", &noXvExtension}, > #endif > @@ -245,7 +248,7 @@ static const ExtensionModule staticExtensions[] = { > #endif > {XInputExtensionInit, "XInputExtension", NULL}, > #ifdef XTEST > - {XTestExtensionInit, XTestExtensionName, &noTestExtensions}, > + {XTestExtensionInit, XTestExtensionName, &noXTestExtension}, > #endif > {BigReqExtensionInit, "BIG-REQUESTS", NULL}, > {SyncExtensionInit, "SYNC", NULL}, > @@ -285,7 +288,7 @@ static const ExtensionModule staticExtensions[] = { > {DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension}, > #endif > #ifdef XRECORD > - {RecordExtensionInit, "RECORD", &noTestExtensions}, > + {RecordExtensionInit, "RECORD", &noRecordExtension}, > #endif > #ifdef DPMSExtension > {DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension}, > diff --git a/os/utils.c b/os/utils.c > index c4d013b..a285622 100644 > --- a/os/utils.c > +++ b/os/utils.c > @@ -122,7 +122,11 @@ __stdcall unsigned long GetTickCount(void); > > #include "picture.h" > > -Bool noTestExtensions; > +Bool noXTestExtension; > + > +#ifdef XRECORD > +Bool noRecordExtension = TRUE; > +#endif > > #ifdef COMPOSITE > Bool noCompositeExtension = FALSE; > @@ -567,6 +571,10 @@ UseMsg(void) > ErrorF("-nopn reject failure to listen on all ports\n"); > ErrorF("-r turns off auto-repeat\n"); > ErrorF("r turns on auto-repeat \n"); > +#ifdef XRECORD > + ErrorF("+record enable RECORD extension\n"); > + ErrorF("-record disable RECORD extension\n"); > +#endif > ErrorF("-render [default|mono|gray|color] set render color alloc > policy\n"); > ErrorF("-retro start with classic stipple and cursor\n"); > ErrorF("-s # screen-saver timeout (minutes)\n"); > @@ -574,7 +582,7 @@ UseMsg(void) > ErrorF("-t # default pointer threshold (pixels/t)\n"); > ErrorF("-terminate terminate at server reset\n"); > ErrorF("-to # connection time out\n"); > - ErrorF("-tst disable testing extensions\n"); > + ErrorF("-tst disable XTEST extension\n"); > ErrorF("ttyxx server started from init on /dev/ttyxx\n"); > ErrorF("v video blanking for screen-saver\n"); > ErrorF("-v screen-saver without video blanking\n"); > @@ -916,6 +924,12 @@ ProcessCommandLine(int argc, char *argv[]) > defaultKeyboardControl.autoRepeat = TRUE; > else if (strcmp(argv[i], "-r") == 0) > defaultKeyboardControl.autoRepeat = FALSE; > +#ifdef XRECORD > + else if (strcmp(argv[i], "-record") == 0) > + noRecordExtension = TRUE; > + else if (strcmp(argv[i], "+record") == 0) > + noRecordExtension = FALSE; > +#endif > else if (strcmp(argv[i], "-retro") == 0) > party_like_its_1989 = TRUE; > else if (strcmp(argv[i], "-s") == 0) { > @@ -947,7 +961,7 @@ ProcessCommandLine(int argc, char *argv[]) > UseMsg(); > } > else if (strcmp(argv[i], "-tst") == 0) { > - noTestExtensions = TRUE; > + noXTestExtension = TRUE; > } > else if (strcmp(argv[i], "v") == 0) > defaultScreenSaverBlanking = PreferBlanking; > -- > 2.6.1 > > > > -- > -keith > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
