mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
macOS: Support click-dragging out of a window (#1607)
* macos: Support click-dragging out of a window * macos: Use NSEvent::pressedMouseButtons for click-dragging * macos: Click-dragging: Move pressedMouseButtons inside
This commit is contained in:
parent
bf62103417
commit
2191e9ecd5
|
@ -915,8 +915,11 @@ fn mouse_motion(this: &Object, event: id) {
|
||||||
|| view_point.x > view_rect.size.width
|
|| view_point.x > view_rect.size.width
|
||||||
|| view_point.y > view_rect.size.height
|
|| view_point.y > view_rect.size.height
|
||||||
{
|
{
|
||||||
// Point is outside of the client area (view)
|
let mouse_buttons_down: NSInteger = msg_send![class!(NSEvent), pressedMouseButtons];
|
||||||
return;
|
if mouse_buttons_down == 0 {
|
||||||
|
// Point is outside of the client area (view) and no buttons are pressed
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let x = view_point.x as f64;
|
let x = view_point.x as f64;
|
||||||
|
|
Loading…
Reference in a new issue