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

Side by Side Diff: trunk/src/ui/base/x/x11_util.cc

Issue 63443002: Revert 233414 "x11: Move XInput2 availability information out of..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/ui/base/x/x11_util.h ('k') | trunk/src/ui/events/x/device_data_manager.h » ('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 (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 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 return is_shape_available; 259 return is_shape_available;
260 260
261 } 261 }
262 262
263 } // namespace 263 } // namespace
264 264
265 bool XDisplayExists() { 265 bool XDisplayExists() {
266 return (gfx::GetXDisplay() != NULL); 266 return (gfx::GetXDisplay() != NULL);
267 } 267 }
268 268
269 bool IsXInput2Available() {
270 return DeviceDataManager::GetInstance()->IsXInput2Available();
271 }
272
273 static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) { 269 static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) {
274 int dummy; 270 int dummy;
275 Bool pixmaps_supported; 271 Bool pixmaps_supported;
276 // Query the server's support for XSHM. 272 // Query the server's support for XSHM.
277 if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported)) 273 if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported))
278 return SHARED_MEMORY_NONE; 274 return SHARED_MEMORY_NONE;
279 275
280 #if defined(OS_FREEBSD) 276 #if defined(OS_FREEBSD)
281 // On FreeBSD we can't access the shared memory after it was marked for 277 // On FreeBSD we can't access the shared memory after it was marked for
282 // deletion, unless this behaviour is explicitly enabled by the user. 278 // deletion, unless this behaviour is explicitly enabled by the user.
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1488 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1493 << "minor_code " << static_cast<int>(error_event.minor_code) 1489 << "minor_code " << static_cast<int>(error_event.minor_code)
1494 << " (" << request_str << ")"; 1490 << " (" << request_str << ")";
1495 } 1491 }
1496 1492
1497 // ---------------------------------------------------------------------------- 1493 // ----------------------------------------------------------------------------
1498 // End of x11_util_internal.h 1494 // End of x11_util_internal.h
1499 1495
1500 1496
1501 } // namespace ui 1497 } // namespace ui
OLDNEW
« no previous file with comments | « trunk/src/ui/base/x/x11_util.h ('k') | trunk/src/ui/events/x/device_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698