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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 } | 1151 } |
1152 // An in-activatable window should not interact with the system wm. | 1152 // An in-activatable window should not interact with the system wm. |
1153 if (!activatable_) | 1153 if (!activatable_) |
1154 swa.override_redirect = True; | 1154 swa.override_redirect = True; |
1155 | 1155 |
1156 if (swa.override_redirect) | 1156 if (swa.override_redirect) |
1157 attribute_mask |= CWOverrideRedirect; | 1157 attribute_mask |= CWOverrideRedirect; |
1158 | 1158 |
1159 Visual* visual; | 1159 Visual* visual; |
1160 int depth; | 1160 int depth; |
1161 ui::ChooseVisualForWindow(&visual, &depth); | 1161 ui::ChooseVisualForWindow(true, &visual, &depth); |
1162 if (depth == 32) { | 1162 if (depth == 32) { |
1163 attribute_mask |= CWColormap; | 1163 attribute_mask |= CWColormap; |
1164 swa.colormap = | 1164 swa.colormap = |
1165 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone); | 1165 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone); |
1166 | 1166 |
1167 // x.org will BadMatch if we don't set a border when the depth isn't the | 1167 // x.org will BadMatch if we don't set a border when the depth isn't the |
1168 // same as the parent depth. | 1168 // same as the parent depth. |
1169 attribute_mask |= CWBorderPixel; | 1169 attribute_mask |= CWBorderPixel; |
1170 swa.border_pixel = 0; | 1170 swa.border_pixel = 0; |
1171 | 1171 |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 if (linux_ui) { | 2094 if (linux_ui) { |
2095 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2095 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
2096 if (native_theme) | 2096 if (native_theme) |
2097 return native_theme; | 2097 return native_theme; |
2098 } | 2098 } |
2099 | 2099 |
2100 return ui::NativeThemeAura::instance(); | 2100 return ui::NativeThemeAura::instance(); |
2101 } | 2101 } |
2102 | 2102 |
2103 } // namespace views | 2103 } // namespace views |
OLD | NEW |