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_drag_drop_client_aurax11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" |
6 | 6 |
7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
8 | 8 |
9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 void DesktopDragDropClientAuraX11::OnMoveLoopEnded() { | 677 void DesktopDragDropClientAuraX11::OnMoveLoopEnded() { |
678 target_current_context_.reset(); | 678 target_current_context_.reset(); |
679 } | 679 } |
680 | 680 |
681 void DesktopDragDropClientAuraX11::DragTranslate( | 681 void DesktopDragDropClientAuraX11::DragTranslate( |
682 const gfx::Point& root_window_location, | 682 const gfx::Point& root_window_location, |
683 scoped_ptr<ui::OSExchangeData>* data, | 683 scoped_ptr<ui::OSExchangeData>* data, |
684 scoped_ptr<ui::DropTargetEvent>* event, | 684 scoped_ptr<ui::DropTargetEvent>* event, |
685 aura::client::DragDropDelegate** delegate) { | 685 aura::client::DragDropDelegate** delegate) { |
686 gfx::Point root_location = root_window_location; | 686 gfx::Point root_location = root_window_location; |
687 root_window_->GetDispatcher()->ConvertPointFromNativeScreen(&root_location); | 687 root_window_->GetDispatcher()->host()->ConvertPointFromNativeScreen( |
| 688 &root_location); |
688 aura::Window* target_window = | 689 aura::Window* target_window = |
689 root_window_->GetEventHandlerForPoint(root_location); | 690 root_window_->GetEventHandlerForPoint(root_location); |
690 bool target_window_changed = false; | 691 bool target_window_changed = false; |
691 if (target_window != target_window_) { | 692 if (target_window != target_window_) { |
692 if (target_window_) | 693 if (target_window_) |
693 NotifyDragLeave(); | 694 NotifyDragLeave(); |
694 target_window_ = target_window; | 695 target_window_ = target_window; |
695 if (target_window_) | 696 if (target_window_) |
696 target_window_->AddObserver(this); | 697 target_window_->AddObserver(this); |
697 target_window_changed = true; | 698 target_window_changed = true; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 // GdkEvent about the failed drag. (And sending this message doesn't appear | 918 // GdkEvent about the failed drag. (And sending this message doesn't appear |
918 // to go through normal xlib machinery, but instead passes through the low | 919 // to go through normal xlib machinery, but instead passes through the low |
919 // level xProto (the x11 wire format) that I don't understand. | 920 // level xProto (the x11 wire format) that I don't understand. |
920 // | 921 // |
921 // I'm unsure if I have to jump through those hoops, or if XSendEvent is | 922 // I'm unsure if I have to jump through those hoops, or if XSendEvent is |
922 // sufficient. | 923 // sufficient. |
923 XSendEvent(xdisplay_, xid, False, 0, xev); | 924 XSendEvent(xdisplay_, xid, False, 0, xev); |
924 } | 925 } |
925 | 926 |
926 } // namespace views | 927 } // namespace views |
OLD | NEW |