OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "X11/Xlib.h" | 8 #include "X11/Xlib.h" |
9 #include "X11/keysym.h" | 9 #include "X11/keysym.h" |
10 | 10 |
11 #include "SkApplication.h" | 11 #include "SkApplication.h" |
12 #include "SkEvent.h" | 12 #include "SkEvent.h" |
13 #include "SkWindow.h" | 13 #include "SkWindow.h" |
14 #include "SkTypes.h" | 14 #include "SkTypes.h" |
15 | 15 |
16 #include <signal.h> | 16 #include <signal.h> |
17 #include <sys/time.h> | 17 #include <sys/time.h> |
18 | 18 |
19 SkOSWindow* gWindow; | 19 SkOSWindow* gWindow; |
20 | 20 |
21 int main(int argc, char** argv){ | 21 int main(int argc, char** argv){ |
22 gWindow = create_sk_window(NULL, argc, argv); | 22 gWindow = create_sk_window(NULL, argc, argv); |
23 | 23 |
24 // drain any events that occurred before gWindow was assigned. | |
25 while (SkEvent::ProcessEvent()); | |
26 | |
27 // Start normal Skia sequence | 24 // Start normal Skia sequence |
28 application_init(); | 25 application_init(); |
29 | 26 |
30 gWindow->loop(); | 27 gWindow->loop(); |
31 | 28 |
32 delete gWindow; | 29 delete gWindow; |
33 application_term(); | 30 application_term(); |
34 return 0; | 31 return 0; |
35 } | 32 } |
36 | 33 |
37 // SkEvent handlers | 34 // SkEvent handlers |
OLD | NEW |