mirror of https://github.com/mpv-player/mpv
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:
parent
ba45f2004f
commit
92cb47338f
|
@ -134,7 +134,7 @@ class View: NSView, CALayerDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func mouseDown(with event: NSEvent) {
|
override func mouseDown(with event: NSEvent) {
|
||||||
hasMouseDown = true
|
hasMouseDown = event.clickCount <= 1
|
||||||
input?.processMouse(event: event)
|
input?.processMouse(event: event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ class View: NSView, CALayerDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func rightMouseDown(with event: NSEvent) {
|
override func rightMouseDown(with event: NSEvent) {
|
||||||
hasMouseDown = true
|
hasMouseDown = event.clickCount <= 1
|
||||||
input?.processMouse(event: event)
|
input?.processMouse(event: event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class View: NSView, CALayerDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
override func otherMouseDown(with event: NSEvent) {
|
override func otherMouseDown(with event: NSEvent) {
|
||||||
hasMouseDown = true
|
hasMouseDown = event.clickCount <= 1
|
||||||
input?.processMouse(event: event)
|
input?.processMouse(event: event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue