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 "ui/base/events/event_constants.h" | 5 #include "ui/base/events/event_constants.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 double GetTouchParamFromXEvent(XEvent* xev, | 254 double GetTouchParamFromXEvent(XEvent* xev, |
255 ui::DeviceDataManager::DataType val, | 255 ui::DeviceDataManager::DataType val, |
256 double default_value) { | 256 double default_value) { |
257 ui::DeviceDataManager::GetInstance()->GetEventData( | 257 ui::DeviceDataManager::GetInstance()->GetEventData( |
258 *xev, val, &default_value); | 258 *xev, val, &default_value); |
259 return default_value; | 259 return default_value; |
260 } | 260 } |
261 | 261 |
262 Atom GetNoopEventAtom() { | 262 Atom GetNoopEventAtom() { |
263 return XInternAtom( | 263 return XInternAtom(ui::GetXDisplay(), "noop", False); |
264 base::MessagePumpX11::GetDefaultXDisplay(), | |
265 "noop", False); | |
266 } | 264 } |
267 | 265 |
268 } // namespace | 266 } // namespace |
269 | 267 |
270 namespace ui { | 268 namespace ui { |
271 | 269 |
272 void UpdateDeviceList() { | 270 void UpdateDeviceList() { |
273 Display* display = GetXDisplay(); | 271 Display* display = GetXDisplay(); |
274 DeviceListCacheX::GetInstance()->UpdateDeviceList(display); | 272 DeviceListCacheX::GetInstance()->UpdateDeviceList(display); |
275 TouchFactory::GetInstance()->UpdateDeviceList(display); | 273 TouchFactory::GetInstance()->UpdateDeviceList(display); |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 noop->xclient.format = 8; | 746 noop->xclient.format = 8; |
749 DCHECK(!noop->xclient.display); | 747 DCHECK(!noop->xclient.display); |
750 } | 748 } |
751 // Make sure we use atom from current xdisplay, which may | 749 // Make sure we use atom from current xdisplay, which may |
752 // change during the test. | 750 // change during the test. |
753 noop->xclient.message_type = GetNoopEventAtom(); | 751 noop->xclient.message_type = GetNoopEventAtom(); |
754 return noop; | 752 return noop; |
755 } | 753 } |
756 | 754 |
757 } // namespace ui | 755 } // namespace ui |
OLD | NEW |