Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging and dropping a file doesn't work in macOS Mojave #1058

Closed
Luflosi opened this issue Oct 10, 2018 · 3 comments
Closed

Dragging and dropping a file doesn't work in macOS Mojave #1058

Luflosi opened this issue Oct 10, 2018 · 3 comments

Comments

@Luflosi
Copy link
Contributor

Luflosi commented Oct 10, 2018

When trying to drag and drop a file, the following error is printed:

2018-10-10 23:18:59.888 kitty[24205:1276159] -[__NSCFString count]: unrecognized selector sent to instance 0x7fac47c383c0
2018-10-10 23:18:59.889 kitty[24205:1276159] *** Canceling drag because exception 'NSInvalidArgumentException' (reason '-[__NSCFString count]: unrecognized selector sent to instance 0x7fac47c383c0') was raised during a dragging session

No file path appears in the shell.
The error seems to come from glfw/cocoa_window.m, line 930 (const NSUInteger count = [files count];). If I replace const NSUInteger count = [files count]; by const NSUInteger count = 1;, an error will occur a couple lines below (NSEnumerator* e = [files objectEnumerator];). The files variable seems to contain something unexpected. Adding files = [NSArray arrayWithObjects:@"test", nil]; below NSArray* files = [pasteboard propertyListForType:NSPasteboardTypeFileURL]; in line 925 to overwrite the contents of the array with something known will paste test in the shell when dropping a file, as expected. NSLog(@"%@", files); outputs 2018-10-10 23:14:23.518 kitty[23756:1273375] file:///.file/id=6571367.8608983890/ in an otherwise unmodified kitty.
Sadly I don't know Objective-C enough yet to debug this issue further.

@kovidgoyal
Copy link
Owner

presumably apple changed the api of the pasteboard object in mojave, sigh.

@xareelee
Copy link

Is this issue solved in macOS 10.14 or 10.15?

I still can't drag and drop a file from Finder to Kitty in macOS 10.14.

@kovidgoyal
Copy link
Owner

Works fine for me in catalina with kitty 0.17.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants