summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-03-28 20:47:20 +0100
committerder richter <der.richter@gmx.de>2024-03-29 14:20:40 +0100
commit92cb47338fa226345000f2e48561befd3879017e (patch)
tree1848b5f11dfd339198066cb6d727292608ffb918 /video/out
parentba45f2004f568455a1b3f846516dc2614737eff8 (diff)
downloadmpv-92cb47338fa226345000f2e48561befd3879017e.tar.bz2
mpv-92cb47338fa226345000f2e48561befd3879017e.tar.xz
mac/view: fix cursor visibility when toggling fullscreen
this broke with the recent refactor of the input handling. one of the edge cases was not considered, where not every mouse down event has a corresponding mouse up event, eg all double clicks or more only have one up event after the first down event. this was handled correctly previously. Fixes #13777
Diffstat (limited to 'video/out')
-rw-r--r--video/out/mac/view.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/mac/view.swift b/video/out/mac/view.swift
index 0c6dbcd847..3c0f34722f 100644
--- a/video/out/mac/view.swift
+++ b/video/out/mac/view.swift
@@ -134,7 +134,7 @@ class View: NSView, CALayerDelegate {
}
override func mouseDown(with event: NSEvent) {
- hasMouseDown = true
+ hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}
@@ -145,7 +145,7 @@ class View: NSView, CALayerDelegate {
}
override func rightMouseDown(with event: NSEvent) {
- hasMouseDown = true
+ hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}
@@ -155,7 +155,7 @@ class View: NSView, CALayerDelegate {
}
override func otherMouseDown(with event: NSEvent) {
- hasMouseDown = true
+ hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}