2013-12-07 02:55:22 +01:00
|
|
|
Index: desktop_aura/desktop_screen_win.cc
|
|
|
|
===================================================================
|
2014-04-30 19:14:40 +02:00
|
|
|
--- desktop_aura/desktop_screen_win.cc (revision 263053)
|
2013-12-07 02:55:22 +01:00
|
|
|
+++ desktop_aura/desktop_screen_win.cc (working copy)
|
|
|
|
@@ -54,6 +54,8 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
|
|
|
|
+ if (!window)
|
|
|
|
+ return NULL;
|
2014-04-04 18:50:38 +02:00
|
|
|
aura::WindowTreeHost* host = window->GetHost();
|
|
|
|
return host ? host->GetAcceleratedWidget() : NULL;
|
2013-12-07 02:55:22 +01:00
|
|
|
}
|
2014-02-19 17:27:54 +01:00
|
|
|
Index: desktop_aura/desktop_window_tree_host_win.cc
|
|
|
|
===================================================================
|
2014-04-30 19:14:40 +02:00
|
|
|
--- desktop_aura/desktop_window_tree_host_win.cc (revision 263053)
|
2014-02-19 17:27:54 +01:00
|
|
|
+++ desktop_aura/desktop_window_tree_host_win.cc (working copy)
|
2014-04-04 18:50:38 +02:00
|
|
|
@@ -130,7 +130,9 @@
|
2014-02-19 17:27:54 +01:00
|
|
|
native_widget_delegate_);
|
|
|
|
|
|
|
|
HWND parent_hwnd = NULL;
|
2014-04-04 18:50:38 +02:00
|
|
|
- if (params.parent && params.parent->GetHost())
|
|
|
|
+ if (params.parent_widget)
|
2014-02-19 17:27:54 +01:00
|
|
|
+ parent_hwnd = params.parent_widget;
|
2014-04-04 18:50:38 +02:00
|
|
|
+ else if (params.parent && params.parent->GetHost())
|
|
|
|
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
|
|
|
|
|
|
|
|
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
2014-04-05 00:26:39 +02:00
|
|
|
Index: desktop_aura/desktop_window_tree_host_win.h
|
|
|
|
===================================================================
|
2014-04-30 19:14:40 +02:00
|
|
|
--- desktop_aura/desktop_window_tree_host_win.h (revision 263053)
|
2014-04-05 00:26:39 +02:00
|
|
|
+++ desktop_aura/desktop_window_tree_host_win.h (working copy)
|
|
|
|
@@ -214,6 +214,7 @@
|
|
|
|
LPARAM l_param) OVERRIDE;
|
|
|
|
virtual bool HandleScrollEvent(const ui::ScrollEvent& event) OVERRIDE;
|
|
|
|
|
|
|
|
+ public:
|
|
|
|
Widget* GetWidget();
|
|
|
|
const Widget* GetWidget() const;
|
|
|
|
HWND GetHWND() const;
|
2014-02-06 23:33:18 +01:00
|
|
|
Index: widget.cc
|
|
|
|
===================================================================
|
2014-04-30 19:14:40 +02:00
|
|
|
--- widget.cc (revision 263053)
|
2014-02-06 23:33:18 +01:00
|
|
|
+++ widget.cc (working copy)
|
2014-04-04 18:50:38 +02:00
|
|
|
@@ -122,6 +122,7 @@
|
2014-02-07 00:36:29 +01:00
|
|
|
show_state(ui::SHOW_STATE_DEFAULT),
|
|
|
|
double_buffer(false),
|
|
|
|
parent(NULL),
|
|
|
|
+ parent_widget(NULL),
|
|
|
|
native_widget(NULL),
|
2014-02-19 17:27:54 +01:00
|
|
|
desktop_window_tree_host(NULL),
|
2014-02-07 00:36:29 +01:00
|
|
|
top_level(false),
|
2014-04-04 18:50:38 +02:00
|
|
|
@@ -148,6 +149,7 @@
|
2014-02-06 23:33:18 +01:00
|
|
|
show_state(ui::SHOW_STATE_DEFAULT),
|
|
|
|
double_buffer(false),
|
|
|
|
parent(NULL),
|
|
|
|
+ parent_widget(NULL),
|
|
|
|
native_widget(NULL),
|
2014-02-19 17:27:54 +01:00
|
|
|
desktop_window_tree_host(NULL),
|
2014-02-06 23:33:18 +01:00
|
|
|
top_level(false),
|
2014-04-04 18:50:38 +02:00
|
|
|
@@ -386,7 +388,12 @@
|
2014-03-12 15:36:18 +01:00
|
|
|
Minimize();
|
|
|
|
} else if (params.delegate) {
|
|
|
|
SetContentsView(params.delegate->GetContentsView());
|
|
|
|
- SetInitialBoundsForFramelessWindow(params.bounds);
|
|
|
|
+ if (params.parent_widget) {
|
|
|
|
+ // Set the bounds directly instead of applying an inset.
|
|
|
|
+ SetBounds(params.bounds);
|
|
|
|
+ } else {
|
|
|
|
+ SetInitialBoundsForFramelessWindow(params.bounds);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
native_widget_initialized_ = true;
|
|
|
|
}
|
2013-12-07 02:55:22 +01:00
|
|
|
Index: widget.h
|
|
|
|
===================================================================
|
2014-04-30 19:14:40 +02:00
|
|
|
--- widget.h (revision 263053)
|
2013-12-07 02:55:22 +01:00
|
|
|
+++ widget.h (working copy)
|
2014-04-04 18:50:38 +02:00
|
|
|
@@ -200,6 +200,7 @@
|
2013-12-07 02:55:22 +01:00
|
|
|
// Should the widget be double buffered? Default is false.
|
|
|
|
bool double_buffer;
|
|
|
|
gfx::NativeView parent;
|
|
|
|
+ gfx::AcceleratedWidget parent_widget;
|
|
|
|
// Specifies the initial bounds of the Widget. Default is empty, which means
|
|
|
|
// the NativeWidget may specify a default size. If the parent is specified,
|
|
|
|
// |bounds| is in the parent's coordinate system. If the parent is not
|