| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 return use_native_frame_; | 606 return use_native_frame_; |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { | 609 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
| 610 return false; | 610 return false; |
| 611 } | 611 } |
| 612 | 612 |
| 613 void DesktopWindowTreeHostX11::FrameTypeChanged() { | 613 void DesktopWindowTreeHostX11::FrameTypeChanged() { |
| 614 Widget::FrameType new_type = | 614 Widget::FrameType new_type = |
| 615 native_widget_delegate_->AsWidget()->frame_type(); | 615 native_widget_delegate_->AsWidget()->frame_type(); |
| 616 if (new_type == Widget::FRAME_TYPE_DEFAULT) { |
| 617 // The default is determined by Widget::InitParams::remove_standard_frame |
| 618 // and does not change. |
| 619 return; |
| 620 } |
| 621 |
| 616 SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE); | 622 SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE); |
| 617 // Replace the frame and layout the contents. Even though we don't have a | 623 // Replace the frame and layout the contents. Even though we don't have a |
| 618 // swapable glass frame like on Windows, we still replace the frame because | 624 // swapable glass frame like on Windows, we still replace the frame because |
| 619 // the button assets don't update otherwise. | 625 // the button assets don't update otherwise. |
| 620 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); | 626 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); |
| 621 } | 627 } |
| 622 | 628 |
| 623 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { | 629 void DesktopWindowTreeHostX11::SetFullscreen(bool fullscreen) { |
| 624 if (is_fullscreen_ == fullscreen) | 630 if (is_fullscreen_ == fullscreen) |
| 625 return; | 631 return; |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 if (linux_ui) { | 1679 if (linux_ui) { |
| 1674 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1680 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1675 if (native_theme) | 1681 if (native_theme) |
| 1676 return native_theme; | 1682 return native_theme; |
| 1677 } | 1683 } |
| 1678 | 1684 |
| 1679 return ui::NativeTheme::instance(); | 1685 return ui::NativeTheme::instance(); |
| 1680 } | 1686 } |
| 1681 | 1687 |
| 1682 } // namespace views | 1688 } // namespace views |
| OLD | NEW |