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

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, 11 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..f06f351ae651ea5f42b65321549fdf2047ca11e7 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());
@@ -598,7 +598,7 @@ void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled(
}
bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() {
- return false;
+ return use_native_frame_;
}
void DesktopWindowTreeHostX11::FrameTypeChanged() {
@@ -1110,6 +1110,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