| 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_native_widget_helper_aura.h" | 5 #include "ui/views/widget/desktop_native_widget_helper_aura.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/dispatcher_client.h" | 7 #include "ui/aura/client/dispatcher_client.h" |
| 8 #include "ui/aura/client/screen_position_client.h" | 8 #include "ui/aura/client/screen_position_client.h" |
| 9 #include "ui/aura/desktop/desktop_activation_client.h" | 9 #include "ui/aura/desktop/desktop_activation_client.h" |
| 10 #include "ui/aura/desktop/desktop_cursor_client.h" | 10 #include "ui/aura/desktop/desktop_cursor_client.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 root_window_event_filter_->AddFilter(input_method_filter_.get()); | 170 root_window_event_filter_->AddFilter(input_method_filter_.get()); |
| 171 | 171 |
| 172 capture_client_.reset( | 172 capture_client_.reset( |
| 173 new aura::shared::RootWindowCaptureClient(root_window_.get())); | 173 new aura::shared::RootWindowCaptureClient(root_window_.get())); |
| 174 | 174 |
| 175 cursor_client_.reset(new aura::DesktopCursorClient(root_window_.get())); | 175 cursor_client_.reset(new aura::DesktopCursorClient(root_window_.get())); |
| 176 aura::client::SetCursorClient(root_window_.get(), cursor_client_.get()); | 176 aura::client::SetCursorClient(root_window_.get(), cursor_client_.get()); |
| 177 | 177 |
| 178 #if defined(USE_X11) | 178 #if defined(USE_X11) |
| 179 x11_window_event_filter_.reset( | 179 x11_window_event_filter_.reset( |
| 180 new X11WindowEventFilter(root_window_.get(), activation_client, widget_)); | 180 new X11WindowEventFilter(root_window_.get(), activation_client)); |
| 181 x11_window_event_filter_->SetUseHostWindowBorders(false); | 181 x11_window_event_filter_->SetUseHostWindowBorders(false); |
| 182 root_window_event_filter_->AddFilter(x11_window_event_filter_.get()); | 182 root_window_event_filter_->AddFilter(x11_window_event_filter_.get()); |
| 183 | 183 |
| 184 if (params.type == Widget::InitParams::TYPE_MENU) { | 184 if (params.type == Widget::InitParams::TYPE_MENU) { |
| 185 ::Window window = root_window_->GetAcceleratedWidget(); | 185 ::Window window = root_window_->GetAcceleratedWidget(); |
| 186 XSetWindowAttributes attributes; | 186 XSetWindowAttributes attributes; |
| 187 memset(&attributes, 0, sizeof(attributes)); | 187 memset(&attributes, 0, sizeof(attributes)); |
| 188 attributes.override_redirect = True; | 188 attributes.override_redirect = True; |
| 189 XChangeWindowAttributes(ui::GetXDisplay(), window, CWOverrideRedirect, | 189 XChangeWindowAttributes(ui::GetXDisplay(), window, CWOverrideRedirect, |
| 190 &attributes); | 190 &attributes); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 widget_->GetWidget()->Close(); | 282 widget_->GetWidget()->Close(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void DesktopNativeWidgetHelperAura::OnRootWindowMoved( | 285 void DesktopNativeWidgetHelperAura::OnRootWindowMoved( |
| 286 const aura::RootWindow* root, | 286 const aura::RootWindow* root, |
| 287 const gfx::Point& new_origin) { | 287 const gfx::Point& new_origin) { |
| 288 widget_->GetWidget()->OnNativeWidgetMove(); | 288 widget_->GetWidget()->OnNativeWidgetMove(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace views | 291 } // namespace views |
| OLD | NEW |