mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
macos: speculative fix to drag-n-drop crash
refs: https://github.com/wez/wezterm/issues/4771
This commit is contained in:
parent
e7fe7c07da
commit
67bdc06d73
@ -36,6 +36,8 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
#4876
|
||||
* macOS: wacky initial window size with external monitors or certain font
|
||||
sizes. #4966 #4250
|
||||
* macOS: dragging non-filename data over wezterm could cause it to crash. #4771
|
||||
|
||||
#### Updated
|
||||
* Bundled conpty.dll and OpenConsole.exe to build 1.19.240130002.nupkg
|
||||
|
||||
|
@ -2957,8 +2957,16 @@ impl WindowView {
|
||||
let mut inner = this.inner.borrow_mut();
|
||||
|
||||
let pb: id = unsafe { msg_send![sender, draggingPasteboard] };
|
||||
if pb.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let filenames =
|
||||
unsafe { NSPasteboard::propertyListForType(pb, appkit::NSFilenamesPboardType) };
|
||||
if filenames.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let paths = unsafe { filenames.iter() }
|
||||
.map(|file| unsafe {
|
||||
let path = nsstring_to_str(file);
|
||||
@ -2975,8 +2983,16 @@ impl WindowView {
|
||||
let mut inner = this.inner.borrow_mut();
|
||||
|
||||
let pb: id = unsafe { msg_send![sender, draggingPasteboard] };
|
||||
if pb.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let filenames =
|
||||
unsafe { NSPasteboard::propertyListForType(pb, appkit::NSFilenamesPboardType) };
|
||||
if filenames.is_null() {
|
||||
return NO;
|
||||
}
|
||||
|
||||
let paths = unsafe { filenames.iter() }
|
||||
.map(|file| unsafe {
|
||||
let path = nsstring_to_str(file);
|
||||
|
Loading…
Reference in New Issue
Block a user