mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
macos: fix an incorrect type signature on NSView drawRect (#1104)
This commit is contained in:
parent
1366dc326a
commit
1aab328e2a
|
@ -23,6 +23,7 @@
|
||||||
hijacking `set_decorations` for this purpose.
|
hijacking `set_decorations` for this purpose.
|
||||||
- On macOS and iOS, corrected the auto trait impls of `EventLoopProxy`.
|
- On macOS and iOS, corrected the auto trait impls of `EventLoopProxy`.
|
||||||
- On iOS, add touch pressure information for touch events.
|
- On iOS, add touch pressure information for touch events.
|
||||||
|
- On macOS, fix the signature of `-[NSView drawRect:]`.
|
||||||
|
|
||||||
# 0.20.0 Alpha 2 (2019-07-09)
|
# 0.20.0 Alpha 2 (2019-07-09)
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ lazy_static! {
|
||||||
);
|
);
|
||||||
decl.add_method(
|
decl.add_method(
|
||||||
sel!(drawRect:),
|
sel!(drawRect:),
|
||||||
draw_rect as extern "C" fn(&Object, Sel, id),
|
draw_rect as extern "C" fn(&Object, Sel, NSRect),
|
||||||
);
|
);
|
||||||
decl.add_method(
|
decl.add_method(
|
||||||
sel!(acceptsFirstResponder),
|
sel!(acceptsFirstResponder),
|
||||||
|
@ -280,7 +280,7 @@ extern "C" fn view_did_move_to_window(this: &Object, _sel: Sel) {
|
||||||
trace!("Completed `viewDidMoveToWindow`");
|
trace!("Completed `viewDidMoveToWindow`");
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" fn draw_rect(this: &Object, _sel: Sel, rect: id) {
|
extern "C" fn draw_rect(this: &Object, _sel: Sel, rect: NSRect) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let state_ptr: *mut c_void = *this.get_ivar("winitState");
|
let state_ptr: *mut c_void = *this.get_ivar("winitState");
|
||||||
let state = &mut *(state_ptr as *mut ViewState);
|
let state = &mut *(state_ptr as *mut ViewState);
|
||||||
|
|
Loading…
Reference in a new issue