Index: tools/xdisplaycheck/xdisplaycheck.cc |
=================================================================== |
--- tools/xdisplaycheck/xdisplaycheck.cc (revision 135379) |
+++ tools/xdisplaycheck/xdisplaycheck.cc (working copy) |
@@ -12,6 +12,7 @@ |
#include <errno.h> |
#include <stdio.h> |
+#include <string.h> |
#include <time.h> |
#include <X11/Xlib.h> |
@@ -34,8 +35,18 @@ |
} |
int main(int argc, char* argv[]) { |
+ Display* display = NULL; |
+ if (argv[1] && strcmp(argv[1], "--noserver")==0) { |
cmp
2012/05/18 20:05:24
spaces around ==
Peter Mayo
2012/05/18 20:25:44
Done.
|
+ display = XOpenDisplay(NULL); |
+ if (display) { |
+ fprintf(stderr, "Found unexpected connectable display %s\n", |
+ XDisplayName(NULL)); |
+ } |
+ // Use upside down logic to resemble previous behaviour. |
cmp
2012/05/18 20:05:24
can you change this comment to be more explicit ab
Peter Mayo
2012/05/18 20:25:44
Better?
|
+ return !display; |
+ } |
+ |
int kNumTries = 78; // 78*77/2 * 10 = 30s of waiting |
- Display* display = NULL; |
int tries; |
for (tries = 0; tries < kNumTries; ++tries) { |
display = XOpenDisplay(NULL); |