fix: drag and drop should copy on macOS (#35963)
This commit is contained in:
		
					parent
					
						
							
								9006f0e0c5
							
						
					
				
			
			
				commit
				
					
						b3fd5eb258
					
				
			
		
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -20,7 +20,8 @@
 | 
			
		|||
 | 
			
		||||
- (NSDragOperation)draggingSession:(NSDraggingSession*)session
 | 
			
		||||
    sourceOperationMaskForDraggingContext:(NSDraggingContext)context {
 | 
			
		||||
  return NSDragOperationEvery;
 | 
			
		||||
  return context == NSDraggingContextOutsideApplication ? NSDragOperationCopy
 | 
			
		||||
                                                        : NSDragOperationEvery;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
| 
						 | 
				
			
			@ -70,7 +71,7 @@ void DragFileItems(const std::vector<base::FilePath>& files,
 | 
			
		|||
  NSEvent* dragEvent =
 | 
			
		||||
      [NSEvent mouseEventWithType:NSEventTypeLeftMouseDragged
 | 
			
		||||
                         location:position
 | 
			
		||||
                    modifierFlags:NSEventMaskLeftMouseDragged
 | 
			
		||||
                    modifierFlags:0
 | 
			
		||||
                        timestamp:eventTime
 | 
			
		||||
                     windowNumber:[[native_view window] windowNumber]
 | 
			
		||||
                          context:nil
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue