mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
macOS: Correct prepareForDragOperation:
signature (#741)
This commit is contained in:
parent
cb76dcae2a
commit
33c8aa660f
|
@ -16,6 +16,7 @@
|
|||
- On Wayland, DPI calculation is handled by smithay-client-toolkit.
|
||||
- On X11, `WindowBuilder::with_min_dimensions` and `WindowBuilder::with_max_dimensions` now correctly account for DPI.
|
||||
- Added support for generating dummy `DeviceId`s and `WindowId`s to better support unit testing.
|
||||
- On macOS, fixed unsoundness in drag-and-drop that could result in drops being rejected.
|
||||
|
||||
# Version 0.18.0 (2018-11-07)
|
||||
|
||||
|
|
|
@ -330,7 +330,9 @@ impl WindowDelegate {
|
|||
}
|
||||
|
||||
/// Invoked when the image is released
|
||||
extern fn prepare_for_drag_operation(_: &Object, _: Sel, _: id) {}
|
||||
extern fn prepare_for_drag_operation(_: &Object, _: Sel, _: id) -> BOOL {
|
||||
YES
|
||||
}
|
||||
|
||||
/// Invoked after the released image has been removed from the screen
|
||||
extern fn perform_drag_operation(this: &Object, _: Sel, sender: id) -> BOOL {
|
||||
|
@ -465,7 +467,7 @@ impl WindowDelegate {
|
|||
decl.add_method(sel!(draggingEntered:),
|
||||
dragging_entered as extern fn(&Object, Sel, id) -> BOOL);
|
||||
decl.add_method(sel!(prepareForDragOperation:),
|
||||
prepare_for_drag_operation as extern fn(&Object, Sel, id));
|
||||
prepare_for_drag_operation as extern fn(&Object, Sel, id) -> BOOL);
|
||||
decl.add_method(sel!(performDragOperation:),
|
||||
perform_drag_operation as extern fn(&Object, Sel, id) -> BOOL);
|
||||
decl.add_method(sel!(concludeDragOperation:),
|
||||
|
|
Loading…
Reference in a new issue