| 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 // 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |