Merge pull request #2134 from zed-industries/fix-action-keystroke-bugs
Fix several action dispatching bugs
This commit is contained in:
parent
f753a83eb1
commit
58b819e9a4
9 changed files with 89 additions and 50 deletions
|
@ -14,12 +14,12 @@ use pathfinder_geometry::{
|
|||
|
||||
pub trait Vector2FExt {
|
||||
/// Converts self to an NSPoint with y axis pointing up.
|
||||
fn to_screen_ns_point(&self, native_window: id) -> NSPoint;
|
||||
fn to_screen_ns_point(&self, native_window: id, window_height: f64) -> NSPoint;
|
||||
}
|
||||
impl Vector2FExt for Vector2F {
|
||||
fn to_screen_ns_point(&self, native_window: id) -> NSPoint {
|
||||
fn to_screen_ns_point(&self, native_window: id, window_height: f64) -> NSPoint {
|
||||
unsafe {
|
||||
let point = NSPoint::new(self.x() as f64, -self.y() as f64);
|
||||
let point = NSPoint::new(self.x() as f64, window_height - self.y() as f64);
|
||||
msg_send![native_window, convertPointToScreen: point]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue