OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_pump_x.h" | 5 #include "base/message_pump_x.h" |
6 | 6 |
7 #include <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 return; | 63 return; |
64 | 64 |
65 int event, err; | 65 int event, err; |
66 | 66 |
67 if (!XQueryExtension(display, "XInputExtension", &xiopcode, &event, &err)) { | 67 if (!XQueryExtension(display, "XInputExtension", &xiopcode, &event, &err)) { |
68 VLOG(1) << "X Input extension not available."; | 68 VLOG(1) << "X Input extension not available."; |
69 xiopcode = -1; | 69 xiopcode = -1; |
70 return; | 70 return; |
71 } | 71 } |
72 | 72 |
73 #if defined(USE_XI2_MT) | |
74 int major = 2, minor = 1; | |
sadrul
2011/09/19 15:58:08
Given that the official XInput2.1 will not have th
Daniel Kurtz
2011/09/20 05:12:27
I agree with sadrul. Please make 2.2 by default.
ningxin.hu
2011/09/20 14:28:59
Thanks for comments. Will use USE_XI2_MT as minimu
| |
75 #else | |
73 int major = 2, minor = 0; | 76 int major = 2, minor = 0; |
77 #endif | |
74 if (XIQueryVersion(display, &major, &minor) == BadRequest) { | 78 if (XIQueryVersion(display, &major, &minor) == BadRequest) { |
75 VLOG(1) << "XInput2 not supported in the server."; | 79 VLOG(1) << "XInput2 not supported in the server."; |
76 xiopcode = -1; | 80 xiopcode = -1; |
77 return; | 81 return; |
78 } | 82 } |
79 } | 83 } |
80 | 84 |
81 } // namespace | 85 } // namespace |
82 | 86 |
83 namespace base { | 87 namespace base { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 } | 284 } |
281 | 285 |
282 MessagePumpObserver::EventStatus | 286 MessagePumpObserver::EventStatus |
283 MessagePumpObserver::WillProcessXEvent(XEvent* xev) { | 287 MessagePumpObserver::WillProcessXEvent(XEvent* xev) { |
284 return EVENT_CONTINUE; | 288 return EVENT_CONTINUE; |
285 } | 289 } |
286 | 290 |
287 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small); | 291 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small); |
288 | 292 |
289 } // namespace base | 293 } // namespace base |
OLD | NEW |