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
1 changed files with 3 additions and 3 deletions

View File

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