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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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_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/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 void DesktopDragDropClientAuraX11::OnMoveLoopEnded() { 674 void DesktopDragDropClientAuraX11::OnMoveLoopEnded() {
675 target_current_context_.reset(); 675 target_current_context_.reset();
676 } 676 }
677 677
678 void DesktopDragDropClientAuraX11::DragTranslate( 678 void DesktopDragDropClientAuraX11::DragTranslate(
679 const gfx::Point& root_window_location, 679 const gfx::Point& root_window_location,
680 scoped_ptr<ui::OSExchangeData>* data, 680 scoped_ptr<ui::OSExchangeData>* data,
681 scoped_ptr<ui::DropTargetEvent>* event, 681 scoped_ptr<ui::DropTargetEvent>* event,
682 aura::client::DragDropDelegate** delegate) { 682 aura::client::DragDropDelegate** delegate) {
683 gfx::Point root_location = root_window_location; 683 gfx::Point root_location = root_window_location;
684 root_window_->GetRootWindow()->ConvertPointFromNativeScreen(&root_location); 684 root_window_->GetDispatcher()->ConvertPointFromNativeScreen(&root_location);
685 aura::Window* target_window = 685 aura::Window* target_window =
686 root_window_->GetEventHandlerForPoint(root_location); 686 root_window_->GetEventHandlerForPoint(root_location);
687 bool target_window_changed = false; 687 bool target_window_changed = false;
688 if (target_window != target_window_) { 688 if (target_window != target_window_) {
689 if (target_window_) 689 if (target_window_)
690 NotifyDragLeave(); 690 NotifyDragLeave();
691 target_window_ = target_window; 691 target_window_ = target_window;
692 if (target_window_) 692 if (target_window_)
693 target_window_->AddObserver(this); 693 target_window_->AddObserver(this);
694 target_window_changed = true; 694 target_window_changed = true;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 // GdkEvent about the failed drag. (And sending this message doesn't appear 914 // GdkEvent about the failed drag. (And sending this message doesn't appear
915 // to go through normal xlib machinery, but instead passes through the low 915 // to go through normal xlib machinery, but instead passes through the low
916 // level xProto (the x11 wire format) that I don't understand. 916 // level xProto (the x11 wire format) that I don't understand.
917 // 917 //
918 // I'm unsure if I have to jump through those hoops, or if XSendEvent is 918 // I'm unsure if I have to jump through those hoops, or if XSendEvent is
919 // sufficient. 919 // sufficient.
920 XSendEvent(xdisplay_, xid, False, 0, xev); 920 XSendEvent(xdisplay_, xid, False, 0, xev);
921 } 921 }
922 922
923 } // namespace views 923 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/ui_controls_factory_desktop_aurax11.cc ('k') | ui/views/widget/desktop_aura/desktop_drop_target_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698