| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
| index 25e8ef178fd7806924071c83b88d2b2f621640c9..af652f3f1ddd7b85aa29013f25fa5e3b81b1c7b6 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
| @@ -35,7 +35,7 @@ class DesktopDragDropClientAuraX11;
|
| class DesktopDispatcherClient;
|
| class DesktopWindowTreeHostObserverX11;
|
| class X11DesktopWindowMoveClient;
|
| -class X11ScopedCapture;
|
| +class X11CaptureWindow;
|
| class X11WindowEventFilter;
|
|
|
| class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| @@ -192,9 +192,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| // Sets whether the window's borders are provided by the window manager.
|
| void SetUseNativeFrame(bool use_native_frame);
|
|
|
| - // Called when another DRWHL takes capture, or when capture is released
|
| - // entirely.
|
| - void OnCaptureReleased();
|
| + // Releases |x11_capture_window_| so that it can be used by another
|
| + // DesktopWindowTreeHostX11.
|
| + scoped_ptr<X11CaptureWindow> ReleaseCaptureWindow();
|
|
|
| // Dispatches a mouse event, taking mouse capture into account. If a
|
| // different host has capture, we translate the event to its coordinate space
|
| @@ -305,18 +305,15 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| // The size of the window manager provided borders (if any).
|
| gfx::Insets native_window_frame_borders_;
|
|
|
| - // The current root window host that has capture. While X11 has something
|
| - // like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and
|
| - // there are no notifications when this changes. We need to track this so we
|
| - // can notify widgets when they have lost capture, which controls a bunch of
|
| - // things in views like hiding menus.
|
| + // The current DesktopWindowTreeHostX11 which has capture. Set synchronously
|
| + // when capture is requested via SetCapture().
|
| static DesktopWindowTreeHostX11* g_current_capture;
|
|
|
| // A list of all (top-level) windows that have been created but not yet
|
| // destroyed.
|
| static std::list<XID>* open_windows_;
|
|
|
| - scoped_ptr<X11ScopedCapture> x11_capture_;
|
| + scoped_ptr<X11CaptureWindow> capture_window_;
|
|
|
| base::string16 window_title_;
|
|
|
|
|