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

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: Big refactor; fix Windows opaque windows when Glass is enabled. 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
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 51736b7ee906fc427abbed3f04331a14ed55c17d..a2175fa7620fe97aaa8faace55904b5d0259393c 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;

Powered by Google App Engine
This is Rietveld 408576698