diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-05-31 14:16:27 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-05-31 14:16:27 +0200 |
commit | 25ae58fbbefc543be09c5910fee08017af3623f4 (patch) | |
tree | 8224e413f8c6cc3cfa742c37ec972a40c0dea270 /video/out/cocoa_common.m | |
parent | 2c4f5b75c0862871e8a74cb58a32f46e087af050 (diff) | |
download | mpv-25ae58fbbefc543be09c5910fee08017af3623f4.tar.bz2 mpv-25ae58fbbefc543be09c5910fee08017af3623f4.tar.xz |
cocoa_common: fix mouse autohide on MenuBar/Dock interaction
This is needed after last commit. A bug within a bug (yo dawg)! Serious
explaination in the source code comment so that it's not forgotten.
Diffstat (limited to 'video/out/cocoa_common.m')
-rw-r--r-- | video/out/cocoa_common.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index e541066a7c..8a83ed945d 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -863,8 +863,14 @@ int vo_cocoa_cgl_color_size(struct vo *vo) - (NSPoint) mouseLocation { + struct vo_cocoa_state *s = self.videoOutput->cocoa; NSPoint mLoc = [NSEvent mouseLocation]; - NSPoint wLoc = [self.window convertScreenToBase:mLoc]; + // Always use the "windowed" `s->window` to do hit detection since using + // self.window which points to and instance of NSFullScreenWindow while in + // fullscreen results in the cursor being reported to be *inside* the view + // even when accessing MenuBar and Dock. This results in the mouse behing + // autohidden upon inactivity on those case which is terrible, terrible UX. + NSPoint wLoc = [s->window convertScreenToBase:mLoc]; return [self convertPoint:wLoc fromView:nil]; } |