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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 10 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698