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 b39dacf56bf0873fb2652e17033dc3efc43e3f67..b8a6e5f319a62f3b057e2723dfe31c7009f93c80 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 |
@@ -15,6 +15,7 @@ |
#include "ui/base/cursor/cursor_loader_x11.h" |
#include "ui/events/event_source.h" |
#include "ui/events/platform/platform_event_dispatcher.h" |
+#include "ui/gfx/insets.h" |
#include "ui/gfx/rect.h" |
#include "ui/gfx/x/x11_atom_cache.h" |
#include "ui/views/views_export.h" |
@@ -58,6 +59,14 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 |
// Returns the current bounds in terms of the X11 Root Window. |
gfx::Rect GetX11RootWindowBounds() const; |
+ // Returns the current bounds in terms of the X11 Root Window including the |
+ // borders provided by the window manager (if any). |
+ gfx::Rect GetX11RootWindowOuterBounds() const; |
+ |
+ // Returns the window shape if the window is not rectangular. Returns NULL |
+ // otherwise. |
+ ::Region GetWindowShape() const; |
+ |
// Called by X11DesktopHandler to notify us that the native windowing system |
// has changed our activation. |
void HandleNativeWidgetActivationChanged(bool active); |
@@ -163,6 +172,12 @@ private: |
// detect that they're there. |
bool IsWindowManagerPresent(); |
+ // Called when |xwindow_|'s _NET_WM_STATE property is updated. |
+ void OnWMStateUpdated(); |
+ |
+ // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. |
+ void OnFrameExtentsUpdated(); |
+ |
// Sends a message to the x11 window manager, enabling or disabling the |
// states |state1| and |state2|. |
void SetWMSpecState(bool enabled, ::Atom state1, ::Atom state2); |
@@ -280,8 +295,14 @@ private: |
ObserverList<DesktopWindowTreeHostObserverX11> observer_list_; |
- // Copy of custom window shape specified via SetShape(), if any. |
- ::Region custom_window_shape_; |
+ // The window shape if the window is non-rectangular. |
+ ::Region window_shape_; |
+ |
+ // Whether |window_shape_| was set via SetShape(). |
+ bool custom_window_shape_; |
+ |
+ // 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 |