| 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled( | 774 void DesktopWindowTreeHostX11::SetVisibilityChangedAnimationsEnabled( |
| 775 bool value) { | 775 bool value) { |
| 776 // Much like the previous NativeWidgetGtk, we don't have anything to do here. | 776 // Much like the previous NativeWidgetGtk, we don't have anything to do here. |
| 777 } | 777 } |
| 778 | 778 |
| 779 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { | 779 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { |
| 780 return use_native_frame_; | 780 return use_native_frame_; |
| 781 } | 781 } |
| 782 | 782 |
| 783 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { | 783 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
| 784 return false; | 784 return IsTranslucentWindowOpacitySupported(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void DesktopWindowTreeHostX11::FrameTypeChanged() { | 787 void DesktopWindowTreeHostX11::FrameTypeChanged() { |
| 788 Widget::FrameType new_type = | 788 Widget::FrameType new_type = |
| 789 native_widget_delegate_->AsWidget()->frame_type(); | 789 native_widget_delegate_->AsWidget()->frame_type(); |
| 790 if (new_type == Widget::FRAME_TYPE_DEFAULT) { | 790 if (new_type == Widget::FRAME_TYPE_DEFAULT) { |
| 791 // The default is determined by Widget::InitParams::remove_standard_frame | 791 // The default is determined by Widget::InitParams::remove_standard_frame |
| 792 // and does not change. | 792 // and does not change. |
| 793 return; | 793 return; |
| 794 } | 794 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 } | 930 } |
| 931 | 931 |
| 932 void DesktopWindowTreeHostX11::OnNativeWidgetBlur() { | 932 void DesktopWindowTreeHostX11::OnNativeWidgetBlur() { |
| 933 } | 933 } |
| 934 | 934 |
| 935 bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { | 935 bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { |
| 936 return false; | 936 return false; |
| 937 } | 937 } |
| 938 | 938 |
| 939 bool DesktopWindowTreeHostX11::IsTranslucentWindowOpacitySupported() const { | 939 bool DesktopWindowTreeHostX11::IsTranslucentWindowOpacitySupported() const { |
| 940 return false; | 940 return use_argb_visual_; |
| 941 } | 941 } |
| 942 | 942 |
| 943 void DesktopWindowTreeHostX11::SizeConstraintsChanged() { | 943 void DesktopWindowTreeHostX11::SizeConstraintsChanged() { |
| 944 UpdateMinAndMaxSize(); | 944 UpdateMinAndMaxSize(); |
| 945 } | 945 } |
| 946 | 946 |
| 947 //////////////////////////////////////////////////////////////////////////////// | 947 //////////////////////////////////////////////////////////////////////////////// |
| 948 // DesktopWindowTreeHostX11, aura::WindowTreeHost implementation: | 948 // DesktopWindowTreeHostX11, aura::WindowTreeHost implementation: |
| 949 | 949 |
| 950 gfx::Transform DesktopWindowTreeHostX11::GetRootTransform() const { | 950 gfx::Transform DesktopWindowTreeHostX11::GetRootTransform() const { |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 if (linux_ui) { | 2053 if (linux_ui) { |
| 2054 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2054 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2055 if (native_theme) | 2055 if (native_theme) |
| 2056 return native_theme; | 2056 return native_theme; |
| 2057 } | 2057 } |
| 2058 | 2058 |
| 2059 return ui::NativeThemeAura::instance(); | 2059 return ui::NativeThemeAura::instance(); |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 } // namespace views | 2062 } // namespace views |
| OLD | NEW |