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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h

Issue 380943003: Do not release capture when transferring capture between Chrome windows on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698