| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | 11 #include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
| 12 | 12 |
| 13 #include <X11/extensions/Xfixes.h> | 13 #include <X11/extensions/Xfixes.h> |
| 14 #include <X11/Xlib.h> | 14 #include <X11/Xlib.h> |
| 15 #include <X11/Xutil.h> | 15 #include <X11/Xutil.h> |
| 16 | 16 |
| 17 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
| 18 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 18 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 19 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 19 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
| 20 #include "webrtc/modules/desktop_capture/mouse_cursor.h" | 20 #include "webrtc/modules/desktop_capture/mouse_cursor.h" |
| 21 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" | 21 #include "webrtc/modules/desktop_capture/x11/x_error_trap.h" |
| 22 #include "webrtc/system_wrappers/interface/logging.h" | 22 #include "webrtc/system_wrappers/include/logging.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // WindowCapturer returns window IDs of X11 windows with WM_STATE attribute. | 26 // WindowCapturer returns window IDs of X11 windows with WM_STATE attribute. |
| 27 // These windows may not be immediate children of the root window, because | 27 // These windows may not be immediate children of the root window, because |
| 28 // window managers may re-parent them to add decorations. However, | 28 // window managers may re-parent them to add decorations. However, |
| 29 // XQueryPointer() expects to be passed children of the root. This function | 29 // XQueryPointer() expects to be passed children of the root. This function |
| 30 // searches up the list of the windows to find the root child that corresponds | 30 // searches up the list of the windows to find the root child that corresponds |
| 31 // to |window|. | 31 // to |window|. |
| 32 Window GetTopLevelWindow(Display* display, Window window) { | 32 Window GetTopLevelWindow(Display* display, Window window) { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( | 223 MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( |
| 224 const DesktopCaptureOptions& options, | 224 const DesktopCaptureOptions& options, |
| 225 ScreenId screen) { | 225 ScreenId screen) { |
| 226 if (!options.x_display()) | 226 if (!options.x_display()) |
| 227 return NULL; | 227 return NULL; |
| 228 return new MouseCursorMonitorX11( | 228 return new MouseCursorMonitorX11( |
| 229 options, DefaultRootWindow(options.x_display()->display())); | 229 options, DefaultRootWindow(options.x_display()->display())); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace webrtc | 232 } // namespace webrtc |
| OLD | NEW |