Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: tools/xdisplaycheck/xdisplaycheck.cc

Issue 9802038: Increase timeout for X starting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/xdisplaycheck/xdisplaycheck.cc
===================================================================
--- tools/xdisplaycheck/xdisplaycheck.cc (revision 129625)
+++ tools/xdisplaycheck/xdisplaycheck.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -34,13 +34,14 @@
}
int main(int argc, char* argv[]) {
- int kNumTries = 50;
+ int kNumTries = 50; // 49*48/2 * 10 = 12.25s of waiting
Display* display = NULL;
- for (int i = 0; i < kNumTries; ++i) {
+ int tries;
+ for (tries = 0; tries < kNumTries; ++tries) {
display = XOpenDisplay(NULL);
if (display)
break;
- Sleep(100);
+ Sleep(10 * tries);
}
if (!display) {
@@ -48,6 +49,8 @@
return -1;
}
+ fprintf(stderr, "Connected after %d retries\n", tries);
+
#if defined(USE_AURA)
// Check for XInput2
int opcode, event, err;
@@ -69,6 +72,9 @@
XIDeviceInfo* devices = XIQueryDevice(display, XIAllDevices, &count);
if (devices)
XIFreeDeviceInfo(devices);
+
+ fprintf(stderr,
+ "XInput2 verified initially sane on %s.\n", XDisplayName(NULL));
#endif
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698