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/Xatom.h> | 7 #include <X11/Xatom.h> |
8 #include <X11/Xregion.h> | 8 #include <X11/Xregion.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled( | 775 void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled( |
776 bool value) { | 776 bool value) { |
777 // Much like the previous NativeWidgetGtk, we don't have anything to do here. | 777 // Much like the previous NativeWidgetGtk, we don't have anything to do here. |
778 } | 778 } |
779 | 779 |
780 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { | 780 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { |
781 return use_native_frame_; | 781 return use_native_frame_; |
782 } | 782 } |
783 | 783 |
784 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { | 784 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
785 return false; | 785 return IsTranslucentWindowOpacitySupported(); |
786 } | 786 } |
787 | 787 |
788 void DesktopWindowTreeHostX11::FrameTypeChanged() { | 788 void DesktopWindowTreeHostX11::FrameTypeChanged() { |
789 Widget::FrameType new_type = | 789 Widget::FrameType new_type = |
790 native_widget_delegate_->AsWidget()->frame_type(); | 790 native_widget_delegate_->AsWidget()->frame_type(); |
791 if (new_type == Widget::FRAME_TYPE_DEFAULT) { | 791 if (new_type == Widget::FRAME_TYPE_DEFAULT) { |
792 // The default is determined by Widget::InitParams::remove_standard_frame | 792 // The default is determined by Widget::InitParams::remove_standard_frame |
793 // and does not change. | 793 // and does not change. |
794 return; | 794 return; |
795 } | 795 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 } | 931 } |
932 | 932 |
933 void DesktopWindowTreeHostX11::OnNativeWidgetBlur() { | 933 void DesktopWindowTreeHostX11::OnNativeWidgetBlur() { |
934 } | 934 } |
935 | 935 |
936 bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { | 936 bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { |
937 return false; | 937 return false; |
938 } | 938 } |
939 | 939 |
940 bool DesktopWindowTreeHostX11::IsTranslucentWindowOpacitySupported() const { | 940 bool DesktopWindowTreeHostX11::IsTranslucentWindowOpacitySupported() const { |
941 return false; | 941 return use_argb_visual_; |
942 } | 942 } |
943 | 943 |
944 void DesktopWindowTreeHostX11::SizeConstraintsChanged() { | 944 void DesktopWindowTreeHostX11::SizeConstraintsChanged() { |
945 UpdateMinAndMaxSize(); | 945 UpdateMinAndMaxSize(); |
946 } | 946 } |
947 | 947 |
948 //////////////////////////////////////////////////////////////////////////////// | 948 //////////////////////////////////////////////////////////////////////////////// |
949 // DesktopWindowTreeHostX11, aura::WindowTreeHost implementation: | 949 // DesktopWindowTreeHostX11, aura::WindowTreeHost implementation: |
950 | 950 |
951 gfx::Transform DesktopWindowTreeHostX11::GetRootTransform() const { | 951 gfx::Transform DesktopWindowTreeHostX11::GetRootTransform() const { |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 if (linux_ui) { | 2065 if (linux_ui) { |
2066 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2066 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
2067 if (native_theme) | 2067 if (native_theme) |
2068 return native_theme; | 2068 return native_theme; |
2069 } | 2069 } |
2070 | 2070 |
2071 return ui::NativeThemeAura::instance(); | 2071 return ui::NativeThemeAura::instance(); |
2072 } | 2072 } |
2073 | 2073 |
2074 } // namespace views | 2074 } // namespace views |
OLD | NEW |