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

Side by Side Diff: base/message_pump_x.cc

Issue 7792094: touchui: support XInput2 MT (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | views/events/event_x.cc » ('j') | views/events/event_x.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 int major = 2, minor = 0; 73 int major = 2, minor = 1;
74 if (XIQueryVersion(display, &major, &minor) == BadRequest) { 74 if (XIQueryVersion(display, &major, &minor) == BadRequest) {
75 VLOG(1) << "XInput2 not supported in the server."; 75 VLOG(1) << "XInput2 not supported in the server.";
76 xiopcode = -1; 76 xiopcode = -1;
77 return; 77 return;
78 } 78 }
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 namespace base { 83 namespace base {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 MessagePumpObserver::EventStatus 282 MessagePumpObserver::EventStatus
283 MessagePumpObserver::WillProcessXEvent(XEvent* xev) { 283 MessagePumpObserver::WillProcessXEvent(XEvent* xev) {
284 return EVENT_CONTINUE; 284 return EVENT_CONTINUE;
285 } 285 }
286 286
287 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small); 287 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small);
288 288
289 } // namespace base 289 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | views/events/event_x.cc » ('j') | views/events/event_x.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698