Skip to content

Commit 9e2357b

Browse files
committed
mac/input: rename old open file function to handleDnd
rename this function to represent better what it does. dnd events should be handled by this one. generic open file events should be handled by the newly introduced function in the apphub, with the same old name.
1 parent 4eddaa4 commit 9e2357b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

osdep/mac/input_helper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ class InputHelper: NSObject {
249249
return String(utf16CodeUnits: chars, count: length)
250250
}
251251

252-
@objc func open(files: [String], append: Bool = false) {
252+
@objc func handleDnd(files: [String]) {
253253
lock.withLock {
254254
guard let input = input else { return }
255255

256-
open(files: files, append: append) { (filesPtr, action) in
256+
open(files: files) { (filesPtr, action) in
257257
mp_input_drop_files(input, Int32(files.count), &filesPtr, action)
258258
}
259259
}

video/out/mac/view.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class View: NSView, CALayerDelegate {
9292
}
9393
}
9494
if files.isEmpty { return false }
95-
input?.open(files: files)
95+
input?.handleDnd(files: files)
9696
return true
9797
}
9898

0 commit comments

Comments
 (0)