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_root_window_host_linux.h" | 5 #include "ui/views/widget/desktop_root_window_host_linux.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 | 10 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 // it sets the focus to our |content_window_|, which will trigger a cascade | 518 // it sets the focus to our |content_window_|, which will trigger a cascade |
519 // of focus changes into views. | 519 // of focus changes into views. |
520 if (content_window_ && content_window_->GetFocusManager() && | 520 if (content_window_ && content_window_->GetFocusManager() && |
521 content_window_->Contains( | 521 content_window_->Contains( |
522 content_window_->GetFocusManager()->GetFocusedWindow())) { | 522 content_window_->GetFocusManager()->GetFocusedWindow())) { |
523 content_window_->GetFocusManager()->SetFocusedWindow(content_window_, NULL); | 523 content_window_->GetFocusManager()->SetFocusedWindow(content_window_, NULL); |
524 } | 524 } |
525 } | 525 } |
526 | 526 |
527 Widget::MoveLoopResult DesktopRootWindowHostLinux::RunMoveLoop( | 527 Widget::MoveLoopResult DesktopRootWindowHostLinux::RunMoveLoop( |
528 const gfx::Point& drag_offset) { | 528 const gfx::Vector2d& drag_offset) { |
529 SetCapture(); | 529 SetCapture(); |
530 | 530 |
531 if (x11_window_move_client_->RunMoveLoop(content_window_, drag_offset) == | 531 if (x11_window_move_client_->RunMoveLoop(content_window_, drag_offset) == |
532 aura::client::MOVE_SUCCESSFUL) | 532 aura::client::MOVE_SUCCESSFUL) |
533 return Widget::MOVE_LOOP_SUCCESSFUL; | 533 return Widget::MOVE_LOOP_SUCCESSFUL; |
534 | 534 |
535 return Widget::MOVE_LOOP_CANCELED; | 535 return Widget::MOVE_LOOP_CANCELED; |
536 } | 536 } |
537 | 537 |
538 void DesktopRootWindowHostLinux::EndMoveLoop() { | 538 void DesktopRootWindowHostLinux::EndMoveLoop() { |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1098 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
1099 internal::NativeWidgetDelegate* native_widget_delegate, | 1099 internal::NativeWidgetDelegate* native_widget_delegate, |
1100 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1100 DesktopNativeWidgetAura* desktop_native_widget_aura, |
1101 const gfx::Rect& initial_bounds) { | 1101 const gfx::Rect& initial_bounds) { |
1102 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1102 return new DesktopRootWindowHostLinux(native_widget_delegate, |
1103 desktop_native_widget_aura, | 1103 desktop_native_widget_aura, |
1104 initial_bounds); | 1104 initial_bounds); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace views | 1107 } // namespace views |
OLD | NEW |