Index: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc |
index 8f8fd898ff2f15f24445ba056307ca4c13a0b0cd..1fdcf08be662e1233863fa866f75dd7d0c4fdda2 100644 |
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc |
@@ -131,6 +131,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( |
window_mapped_(false), |
is_fullscreen_(false), |
is_always_on_top_(false), |
+ use_native_frame_(false), |
root_window_(NULL), |
drag_drop_client_(NULL), |
current_cursor_(ui::kCursorNull), |
@@ -252,9 +253,8 @@ void DesktopWindowTreeHostX11::OnRootWindowCreated( |
// TODO(erg): Unify this code once the other consumer goes away. |
x11_window_event_filter_.reset(new X11WindowEventFilter(root_window_, this)); |
- x11_window_event_filter_->SetUseHostWindowBorders( |
- params.type == Widget::InitParams::TYPE_WINDOW && |
- !params.remove_standard_frame); |
+ SetUseNativeFrame(params.type == Widget::InitParams::TYPE_WINDOW && |
+ !params.remove_standard_frame); |
desktop_native_widget_aura_->root_window_event_filter()->AddHandler( |
x11_window_event_filter_.get()); |
@@ -597,7 +597,11 @@ void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled( |
// Much like the previous NativeWidgetGtk, we don't have anything to do here. |
} |
-bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() { |
+bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { |
+ return use_native_frame_; |
+} |
+ |
+bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
return false; |
} |
@@ -1110,6 +1114,11 @@ bool DesktopWindowTreeHostX11::HasWMSpecProperty(const char* property) const { |
window_properties_.end(); |
} |
+void DesktopWindowTreeHostX11::SetUseNativeFrame(bool use_native_frame) { |
+ use_native_frame_ = use_native_frame; |
+ x11_window_event_filter_->SetUseHostWindowBorders(use_native_frame); |
+} |
+ |
void DesktopWindowTreeHostX11::OnCaptureReleased() { |
x11_capture_.reset(); |
g_current_capture = NULL; |