| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display/chromeos/x11/touchscreen_delegate_x11.h" | 5 #include "ui/display/chromeos/x11/touchscreen_delegate_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/XInput.h> | 7 #include <X11/extensions/XInput.h> |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 | 9 |
| 10 #include <cmath> | 10 #include <cmath> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/message_loop/message_pump_x11.h" | |
| 14 #include "ui/display/chromeos/display_mode.h" | 13 #include "ui/display/chromeos/display_mode.h" |
| 15 #include "ui/display/chromeos/display_snapshot.h" | 14 #include "ui/display/chromeos/display_snapshot.h" |
| 15 #include "ui/gfx/x/x11_types.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 TouchscreenDelegateX11::TouchscreenDelegateX11() | 19 TouchscreenDelegateX11::TouchscreenDelegateX11() |
| 20 : display_(base::MessagePumpX11::GetDefaultXDisplay()) {} | 20 : display_(gfx::GetXDisplay()) {} |
| 21 | 21 |
| 22 TouchscreenDelegateX11::~TouchscreenDelegateX11() {} | 22 TouchscreenDelegateX11::~TouchscreenDelegateX11() {} |
| 23 | 23 |
| 24 void TouchscreenDelegateX11::AssociateTouchscreens( | 24 void TouchscreenDelegateX11::AssociateTouchscreens( |
| 25 DisplayConfigurator::DisplayStateList* outputs) { | 25 DisplayConfigurator::DisplayStateList* outputs) { |
| 26 int ndevices = 0; | 26 int ndevices = 0; |
| 27 Atom valuator_x = XInternAtom(display_, "Abs MT Position X", False); | 27 Atom valuator_x = XInternAtom(display_, "Abs MT Position X", False); |
| 28 Atom valuator_y = XInternAtom(display_, "Abs MT Position Y", False); | 28 Atom valuator_y = XInternAtom(display_, "Abs MT Position Y", False); |
| 29 if (valuator_x == None || valuator_y == None) | 29 if (valuator_x == None || valuator_y == None) |
| 30 return; | 30 return; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 format, | 173 format, |
| 174 PropModeReplace, | 174 PropModeReplace, |
| 175 reinterpret_cast<unsigned char*>(value), | 175 reinterpret_cast<unsigned char*>(value), |
| 176 9); | 176 9); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 XIFreeDeviceInfo(info); | 179 XIFreeDeviceInfo(info); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace ui | 182 } // namespace ui |
| OLD | NEW |