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

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

Issue 52823002: x11: Move XInput2 availability information out of the message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | « ui/base/x/x11_util.h ('k') | ui/events/events.gyp » ('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
269 static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) { 273 static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) {
270 int dummy; 274 int dummy;
271 Bool pixmaps_supported; 275 Bool pixmaps_supported;
272 // Query the server's support for XSHM. 276 // Query the server's support for XSHM.
273 if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported)) 277 if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported))
274 return SHARED_MEMORY_NONE; 278 return SHARED_MEMORY_NONE;
275 279
276 #if defined(OS_FREEBSD) 280 #if defined(OS_FREEBSD)
277 // On FreeBSD we can't access the shared memory after it was marked for 281 // On FreeBSD we can't access the shared memory after it was marked for
278 // deletion, unless this behaviour is explicitly enabled by the user. 282 // deletion, unless this behaviour is explicitly enabled by the user.
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1492 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1489 << "minor_code " << static_cast<int>(error_event.minor_code) 1493 << "minor_code " << static_cast<int>(error_event.minor_code)
1490 << " (" << request_str << ")"; 1494 << " (" << request_str << ")";
1491 } 1495 }
1492 1496
1493 // ---------------------------------------------------------------------------- 1497 // ----------------------------------------------------------------------------
1494 // End of x11_util_internal.h 1498 // End of x11_util_internal.h
1495 1499
1496 1500
1497 } // namespace ui 1501 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_util.h ('k') | ui/events/events.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698