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

Side by Side Diff: ash/host/ash_window_tree_host_x11.cc

Issue 2924343002: Move ui::GetAtom to gfx::GetAtom (Closed)
Patch Set: fix CrOs build Created 3 years, 6 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
« no previous file with comments | « PRESUBMIT.py ('k') | chrome/browser/media/webrtc/window_icon_util_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/host/ash_window_tree_host_x11.h" 5 #include "ash/host/ash_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/Xfixes.h> 7 #include <X11/extensions/Xfixes.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent( 210 void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
211 ui::LocatedEvent* event) { 211 ui::LocatedEvent* event) {
212 TranslateLocatedEvent(event); 212 TranslateLocatedEvent(event);
213 SendEventToSink(event); 213 SendEventToSink(event);
214 } 214 }
215 215
216 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) { 216 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
217 if (!ui::IsXInput2Available()) 217 if (!ui::IsXInput2Available())
218 return; 218 return;
219 // Temporarily pause tap-to-click when the cursor is hidden. 219 // Temporarily pause tap-to-click when the cursor is hidden.
220 Atom prop = ui::X11AtomCache::GetInstance()->GetAtom("Tap Paused"); 220 Atom prop = gfx::GetAtom("Tap Paused");
221 unsigned char value = state; 221 unsigned char value = state;
222 const XIDeviceList& dev_list = 222 const XIDeviceList& dev_list =
223 ui::DeviceListCacheX11::GetInstance()->GetXI2DeviceList(xdisplay()); 223 ui::DeviceListCacheX11::GetInstance()->GetXI2DeviceList(xdisplay());
224 224
225 // Only slave pointer devices could possibly have tap-paused property. 225 // Only slave pointer devices could possibly have tap-paused property.
226 for (int i = 0; i < dev_list.count; i++) { 226 for (int i = 0; i < dev_list.count; i++) {
227 if (dev_list[i].use == XISlavePointer) { 227 if (dev_list[i].use == XISlavePointer) {
228 Atom old_type; 228 Atom old_type;
229 int old_format; 229 int old_format;
230 unsigned long old_nvalues, bytes; 230 unsigned long old_nvalues, bytes;
231 unsigned char* data; 231 unsigned char* data;
232 int result = XIGetProperty(xdisplay(), dev_list[i].deviceid, prop, 0, 0, 232 int result = XIGetProperty(xdisplay(), dev_list[i].deviceid, prop, 0, 0,
233 False, AnyPropertyType, &old_type, &old_format, 233 False, AnyPropertyType, &old_type, &old_format,
234 &old_nvalues, &bytes, &data); 234 &old_nvalues, &bytes, &data);
235 if (result != Success) 235 if (result != Success)
236 continue; 236 continue;
237 XFree(data); 237 XFree(data);
238 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8, 238 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8,
239 PropModeReplace, &value, 1); 239 PropModeReplace, &value, 1);
240 } 240 }
241 } 241 }
242 } 242 }
243 243
244 } // namespace ash 244 } // namespace ash
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | chrome/browser/media/webrtc/window_icon_util_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698