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

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

Issue 821803002: Use XGrabPointer instead of XChangeActivatePointerGrab() to change the cursor during a pointer grab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_capture
Patch Set: Created 5 years, 12 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 | « no previous file | ui/base/x/x11_util.cc » ('j') | ui/base/x/x11_util.cc » ('J')
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 #ifndef UI_BASE_X_X11_UTIL_H_ 5 #ifndef UI_BASE_X_X11_UTIL_H_
6 #define UI_BASE_X_X11_UTIL_H_ 6 #define UI_BASE_X_X11_UTIL_H_
7 7
8 // This file declares utility functions for X11 (Linux only). 8 // This file declares utility functions for X11 (Linux only).
9 // 9 //
10 // These functions do not require the Xlib headers to be included (which is why 10 // These functions do not require the Xlib headers to be included (which is why
(...skipping 27 matching lines...) Expand all
38 namespace ui { 38 namespace ui {
39 39
40 // These functions use the default display and this /must/ be called from 40 // These functions use the default display and this /must/ be called from
41 // the UI thread. Thus, they don't support multiple displays. 41 // the UI thread. Thus, they don't support multiple displays.
42 42
43 // These functions cache their results --------------------------------- 43 // These functions cache their results ---------------------------------
44 44
45 // Returns true if the system supports XINPUT2. 45 // Returns true if the system supports XINPUT2.
46 UI_BASE_EXPORT bool IsXInput2Available(); 46 UI_BASE_EXPORT bool IsXInput2Available();
47 47
48 // Grabs the pointer. It is unnecessary to ungrab the pointer prior to grabbing
49 // it.
50 UI_BASE_EXPORT int GrabPointer(XID window, bool owner_events, ::Cursor cursor);
51
52 // Ungrabs the pointer.
53 UI_BASE_EXPORT void UngrabPointer();
54
48 // X shared memory comes in three flavors: 55 // X shared memory comes in three flavors:
49 // 1) No SHM support, 56 // 1) No SHM support,
50 // 2) SHM putimage, 57 // 2) SHM putimage,
51 // 3) SHM pixmaps + putimage. 58 // 3) SHM pixmaps + putimage.
52 enum SharedMemorySupport { 59 enum SharedMemorySupport {
53 SHARED_MEMORY_NONE, 60 SHARED_MEMORY_NONE,
54 SHARED_MEMORY_PUTIMAGE, 61 SHARED_MEMORY_PUTIMAGE,
55 SHARED_MEMORY_PIXMAP 62 SHARED_MEMORY_PIXMAP
56 }; 63 };
57 // Return the shared memory type of our X connection. 64 // Return the shared memory type of our X connection.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 UI_BASE_EXPORT void ResetXCursorCache(); 382 UI_BASE_EXPORT void ResetXCursorCache();
376 383
377 // Returns the cached XcursorImage for |cursor|. 384 // Returns the cached XcursorImage for |cursor|.
378 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); 385 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor);
379 386
380 } // namespace test 387 } // namespace test
381 388
382 } // namespace ui 389 } // namespace ui
383 390
384 #endif // UI_BASE_X_X11_UTIL_H_ 391 #endif // UI_BASE_X_X11_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/x11_util.cc » ('j') | ui/base/x/x11_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698