0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

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
This commit is contained in:
der richter 2024-03-28 20:47:20 +01:00
parent ba45f2004f
commit 92cb47338f

View File

@ -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)
}