| 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 | 1166 |
| 1167 bounds_in_pixels_ = ToPixelRect(params.bounds); | 1167 bounds_in_pixels_ = ToPixelRect(params.bounds); |
| 1168 bounds_in_pixels_.set_size(AdjustSize(bounds_in_pixels_.size())); | 1168 bounds_in_pixels_.set_size(AdjustSize(bounds_in_pixels_.size())); |
| 1169 xwindow_ = XCreateWindow(xdisplay_, x_root_window_, bounds_in_pixels_.x(), | 1169 xwindow_ = XCreateWindow(xdisplay_, x_root_window_, bounds_in_pixels_.x(), |
| 1170 bounds_in_pixels_.y(), bounds_in_pixels_.width(), | 1170 bounds_in_pixels_.y(), bounds_in_pixels_.width(), |
| 1171 bounds_in_pixels_.height(), | 1171 bounds_in_pixels_.height(), |
| 1172 0, // border width | 1172 0, // border width |
| 1173 depth, InputOutput, visual, attribute_mask, &swa); | 1173 depth, InputOutput, visual, attribute_mask, &swa); |
| 1174 if (ui::PlatformEventSource::GetInstance()) | 1174 if (ui::PlatformEventSource::GetInstance()) |
| 1175 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); | 1175 ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
| 1176 open_windows().push_back(xwindow_); | 1176 open_windows().push_front(xwindow_); |
| 1177 | 1177 |
| 1178 // TODO(erg): Maybe need to set a ViewProp here like in RWHL::RWHL(). | 1178 // TODO(erg): Maybe need to set a ViewProp here like in RWHL::RWHL(). |
| 1179 | 1179 |
| 1180 long event_mask = ButtonPressMask | ButtonReleaseMask | FocusChangeMask | | 1180 long event_mask = ButtonPressMask | ButtonReleaseMask | FocusChangeMask | |
| 1181 KeyPressMask | KeyReleaseMask | | 1181 KeyPressMask | KeyReleaseMask | |
| 1182 EnterWindowMask | LeaveWindowMask | | 1182 EnterWindowMask | LeaveWindowMask | |
| 1183 ExposureMask | VisibilityChangeMask | | 1183 ExposureMask | VisibilityChangeMask | |
| 1184 StructureNotifyMask | PropertyChangeMask | | 1184 StructureNotifyMask | PropertyChangeMask | |
| 1185 PointerMotionMask; | 1185 PointerMotionMask; |
| 1186 XSelectInput(xdisplay_, xwindow_, event_mask); | 1186 XSelectInput(xdisplay_, xwindow_, event_mask); |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2083 if (linux_ui) { | 2083 if (linux_ui) { |
| 2084 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2084 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2085 if (native_theme) | 2085 if (native_theme) |
| 2086 return native_theme; | 2086 return native_theme; |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 return ui::NativeThemeAura::instance(); | 2089 return ui::NativeThemeAura::instance(); |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 } // namespace views | 2092 } // namespace views |
| OLD | NEW |