This repository was archived by the owner on Feb 24, 2025. It is now read-only.
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,11 @@ class TabBarCollectionView: NSCollectionView {
32
32
register ( nib, forItemWithIdentifier: TabBarViewItem . identifier)
33
33
34
34
// Register for the dropped object types we can accept.
35
- registerForDraggedTypes ( [ NSPasteboard . PasteboardType. string] )
35
+ registerForDraggedTypes ( [ . URL] )
36
+ // Enable dragging items from our CollectionView to other applications.
37
+ setDraggingSourceOperationMask ( [ . every] , forLocal: false )
36
38
// Enable dragging items within and into our CollectionView.
37
- setDraggingSourceOperationMask ( NSDragOperation . move, forLocal: false )
39
+ setDraggingSourceOperationMask ( [ . move] , forLocal: true )
38
40
}
39
41
40
42
func clearSelection( ) {
Original file line number Diff line number Diff line change @@ -370,9 +370,9 @@ extension TabBarViewController: NSCollectionViewDelegate {
370
370
func collectionView( _ collectionView: NSCollectionView ,
371
371
pasteboardWriterForItemAt indexPath: IndexPath ) -> NSPasteboardWriting ? {
372
372
if let url = tabCollectionViewModel. tabCollection. tabs [ indexPath. item] . url {
373
- return url. absoluteString as NSString
373
+ return url as NSURL
374
374
} else {
375
- return " " as NSString
375
+ return URL . emptyPage as NSURL
376
376
}
377
377
}
378
378
You can’t perform that action at this time.
0 commit comments