Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: ui/views/widget/desktop_root_window_host_linux.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698