| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 int major = 2, minor = 0; | 67 int major = 2, minor = 0; |
| 68 #endif | 68 #endif |
| 69 if (XIQueryVersion(display, &major, &minor) == BadRequest) { | 69 if (XIQueryVersion(display, &major, &minor) == BadRequest) { |
| 70 DVLOG(1) << "XInput2 not supported in the server."; | 70 DVLOG(1) << "XInput2 not supported in the server."; |
| 71 xiopcode = -1; | 71 xiopcode = -1; |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 #if defined(USE_XI2_MT) | 74 #if defined(USE_XI2_MT) |
| 75 if (major < 2 || (major == 2 && minor < USE_XI2_MT)) { | 75 if (major < 2 || (major == 2 && minor < USE_XI2_MT)) { |
| 76 DVLOG(1) << "XI version on server is " << major << "." << minor << ". " | 76 DVLOG(1) << "XI version on server is " << major << "." << minor << ". " |
| 77 << "But 2." << USE_XI2_MT << " is required."; | 77 << "But 2." << USE_XI2_MT << " is required."; |
| 78 xiopcode = -1; | 78 xiopcode = -1; |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 #endif | 81 #endif |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace | 84 } // namespace |
| 85 | 85 |
| 86 namespace base { | 86 namespace base { |
| 87 | 87 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return true; | 190 return true; |
| 191 } | 191 } |
| 192 return false; | 192 return false; |
| 193 } | 193 } |
| 194 | 194 |
| 195 void MessagePumpX::DidProcessXEvent(XEvent* xevent) { | 195 void MessagePumpX::DidProcessXEvent(XEvent* xevent) { |
| 196 FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent)); | 196 FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent)); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace base | 199 } // namespace base |
| OLD | NEW |