Commit e0b8f3ee authored by Mike Gabriel's avatar Mike Gabriel

Re-add -sync option back to nxagent to allow synchronous debugging of the nxagent DDX.

parent 81d92cd0
......@@ -103,6 +103,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth);
extern char dispatchExceptionAtReset;
char nxagentDisplayName[1024];
Bool nxagentSynchronize = False;
char nxagentShadowDisplayName[1024] = {0};
......@@ -374,6 +375,13 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
if (!strcmp(argv[i], "-sync")) {
if (++i < argc) {
nxagentSynchronize = True;
return 1;
}
}
if (!strcmp(argv[i], "-full")) {
nxagentFullGeneration = True;
return 1;
......
......@@ -50,6 +50,7 @@ extern char nxagentShadowDisplayName[];
extern char nxagentWindowName[];
extern char nxagentDialogName[];
extern Bool nxagentSynchronize;
extern Bool nxagentFullGeneration;
extern int nxagentDefaultClass;
extern Bool nxagentUserDefaultClass;
......
......@@ -1217,6 +1217,9 @@ FIXME: The agent should never exit the program with a FatalError()
FatalError("Unable to open display '%s'.\n", nxagentDisplayName);
}
if (nxagentSynchronize)
XSynchronize(nxagentDisplay, True);
nxagentXConnectionNumber = XConnectionNumber(nxagentDisplay);
#ifdef TEST
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment