parent
0d05273024
commit
1a9c338c92
2 changed files with 14 additions and 15 deletions
|
@ -21,7 +21,11 @@ namespace electron {
|
|||
void DragFileItems(const std::vector<base::FilePath>& files,
|
||||
const gfx::Image& icon,
|
||||
gfx::NativeView view) {
|
||||
// Set up our OLE machinery
|
||||
aura::Window* root_window = view->GetRootWindow();
|
||||
if (!root_window || !aura::client::GetDragDropClient(root_window))
|
||||
return;
|
||||
|
||||
// Set up our OLE machinery.
|
||||
auto data = std::make_unique<ui::OSExchangeData>();
|
||||
|
||||
button_drag_utils::SetDragImage(GURL(), files[0].LossyDisplayName(),
|
||||
|
@ -34,10 +38,6 @@ void DragFileItems(const std::vector<base::FilePath>& files,
|
|||
}
|
||||
data->SetFilenames(file_infos);
|
||||
|
||||
aura::Window* root_window = view->GetRootWindow();
|
||||
if (!root_window || !aura::client::GetDragDropClient(root_window))
|
||||
return;
|
||||
|
||||
gfx::Point location = display::Screen::GetScreen()->GetCursorScreenPoint();
|
||||
// TODO(varunjain): Properly determine and send DragEventSource below.
|
||||
aura::client::GetDragDropClient(root_window)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue