Commit 68c38757 authored by pkotwicz@chromium.org's avatar pkotwicz@chromium.org

Make |DesktopWindowTreeHostX11::use_native_frame_| more robust. In particular,...

Make |DesktopWindowTreeHostX11::use_native_frame_| more robust. In particular, this CL ensures that widgets which expect to use the native frame (e.g. v2 apps, task manager) continue to do so even if DesktopWindowTreeHostX11::FrameTypeChanged() is called.

BUG=348437
TEST=None

Review URL: https://codereview.chromium.org/278823004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271986 0039d316-1c4b-4281-b951-d872f2087c98
parent 93a63f28
...@@ -628,6 +628,12 @@ bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { ...@@ -628,6 +628,12 @@ bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const {
void DesktopWindowTreeHostX11::FrameTypeChanged() { void DesktopWindowTreeHostX11::FrameTypeChanged() {
Widget::FrameType new_type = Widget::FrameType new_type =
native_widget_delegate_->AsWidget()->frame_type(); native_widget_delegate_->AsWidget()->frame_type();
if (new_type == Widget::FRAME_TYPE_DEFAULT) {
// The default is determined by Widget::InitParams::remove_standard_frame
// and does not change.
return;
}
SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE); SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE);
// Replace the frame and layout the contents. Even though we don't have a // Replace the frame and layout the contents. Even though we don't have a
// swapable glass frame like on Windows, we still replace the frame because // swapable glass frame like on Windows, we still replace the frame because
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment