Index: ui/views/window/native_frame_view.cc |
diff --git a/ui/views/window/native_frame_view.cc b/ui/views/window/native_frame_view.cc |
index 0a28110e8affcc23b80f7dd8cb06444fc1e1790c..f133878fdaa90263d4b836e41323ced07535377c 100644 |
--- a/ui/views/window/native_frame_view.cc |
+++ b/ui/views/window/native_frame_view.cc |
@@ -7,6 +7,10 @@ |
#include "ui/views/widget/native_widget.h" |
#include "ui/views/widget/widget.h" |
+#if defined(USE_AURA) && defined(OS_WIN) |
+#include "ui/aura/root_window.h" |
+#endif |
+ |
namespace views { |
//////////////////////////////////////////////////////////////////////////////// |
@@ -29,12 +33,26 @@ gfx::Rect NativeFrameView::GetBoundsForClientView() const { |
gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds( |
const gfx::Rect& client_bounds) const { |
-#if defined(OS_WIN) && !defined(USE_AURA) |
+#if defined(OS_WIN) |
+#if defined(USE_AURA) |
+ aura::RootWindow* window = GetWidget()->GetNativeWindow()->GetRootWindow(); |
+ if (window) { |
+ gfx::AcceleratedWidget hwnd = window->GetAcceleratedWidget(); |
Ben Goodger (Google)
2013/04/29 16:21:55
do we have a util file in views/ui that has a bunc
robertshield
2013/04/29 21:49:59
Moved most of this into hwnd_util_[win|aurawin].cc
|
+ RECT rect = client_bounds.ToRECT(); |
+ DWORD style = ::GetWindowLong(hwnd, GWL_STYLE); |
+ DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE); |
+ AdjustWindowRectEx(&rect, style, FALSE, ex_style); |
+ return gfx::Rect(rect); |
+ } else { |
+ return client_bounds; |
+ } |
+#else |
RECT rect = client_bounds.ToRECT(); |
DWORD style = ::GetWindowLong(GetWidget()->GetNativeView(), GWL_STYLE); |
DWORD ex_style = ::GetWindowLong(GetWidget()->GetNativeView(), GWL_EXSTYLE); |
AdjustWindowRectEx(&rect, style, FALSE, ex_style); |
return gfx::Rect(rect); |
+#endif // defined(USE_AURA) |
#else |
// TODO(sad): |
return client_bounds; |