| 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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 } | 1130 } |
| 1131 // An in-activatable window should not interact with the system wm. | 1131 // An in-activatable window should not interact with the system wm. |
| 1132 if (!activatable_) | 1132 if (!activatable_) |
| 1133 swa.override_redirect = True; | 1133 swa.override_redirect = True; |
| 1134 | 1134 |
| 1135 if (swa.override_redirect) | 1135 if (swa.override_redirect) |
| 1136 attribute_mask |= CWOverrideRedirect; | 1136 attribute_mask |= CWOverrideRedirect; |
| 1137 | 1137 |
| 1138 Visual* visual; | 1138 Visual* visual; |
| 1139 int depth; | 1139 int depth; |
| 1140 ui::ChooseVisualForWindow(&visual, &depth); | 1140 ui::ChooseVisualForWindow(true, &visual, &depth); |
| 1141 if (depth == 32) { | 1141 if (depth == 32) { |
| 1142 attribute_mask |= CWColormap; | 1142 attribute_mask |= CWColormap; |
| 1143 swa.colormap = | 1143 swa.colormap = |
| 1144 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone); | 1144 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone); |
| 1145 | 1145 |
| 1146 // x.org will BadMatch if we don't set a border when the depth isn't the | 1146 // x.org will BadMatch if we don't set a border when the depth isn't the |
| 1147 // same as the parent depth. | 1147 // same as the parent depth. |
| 1148 attribute_mask |= CWBorderPixel; | 1148 attribute_mask |= CWBorderPixel; |
| 1149 swa.border_pixel = 0; | 1149 swa.border_pixel = 0; |
| 1150 | 1150 |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 if (linux_ui) { | 2070 if (linux_ui) { |
| 2071 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2071 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2072 if (native_theme) | 2072 if (native_theme) |
| 2073 return native_theme; | 2073 return native_theme; |
| 2074 } | 2074 } |
| 2075 | 2075 |
| 2076 return ui::NativeThemeAura::instance(); | 2076 return ui::NativeThemeAura::instance(); |
| 2077 } | 2077 } |
| 2078 | 2078 |
| 2079 } // namespace views | 2079 } // namespace views |
| OLD | NEW |