diff options
author | torque <torque@1> | 2015-02-16 14:27:06 -0800 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2015-03-07 19:31:52 +0100 |
commit | bce753060eb9fb99ebc64fb6027d130a37b918a6 (patch) | |
tree | 68e2be94e804493119507fb18a488b6f1f2c3b56 /video/out/cocoa_common.m | |
parent | 678cd30904490e1d898234d6f90d7c78bb34ba87 (diff) | |
download | mpv-bce753060eb9fb99ebc64fb6027d130a37b918a6.tar.bz2 mpv-bce753060eb9fb99ebc64fb6027d130a37b918a6.tar.xz |
cocoa: update mouse coordinates when window is initialized.
Make MpvEventsView -signalMousePosition a public method so it can be
called without a compiler warning. Previously, the mouse position would
be reported as (0,0) until the cursor was moved.
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index be67a60f5a..c2cc2ece43 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -455,6 +455,8 @@ static void create_ui(struct vo *vo, struct mp_rect *win, int geo_flags) view.adapter = adapter; s->view = view; [parent addSubview:s->view]; + // update the cursor position now that the view has been added. + [view signalMousePosition]; #if HAVE_COCOA_APPLICATION cocoa_register_menu_item_action(MPM_H_SIZE, @selector(halfSize)); @@ -572,7 +574,7 @@ int vo_cocoa_config_window(struct vo *vo, uint32_t flags, void *gl_ctx) } // trigger a resize -> don't set vo->dwidth and vo->dheight directly - // since this block is executed asynchrolously to the video + // since this block is executed asynchronously to the video // reconfiguration code. s->pending_events |= VO_EVENT_RESIZE; }); |