Skip to content

Commit

Permalink
mac/view: fix cursor visibility when toggling fullscreen
Browse files Browse the repository at this point in the history
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 mpv-player#13777
  • Loading branch information
Akemi committed Mar 29, 2024
1 parent ba45f20 commit 92cb473
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions video/out/mac/view.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class View: NSView, CALayerDelegate {
}

override func mouseDown(with event: NSEvent) {
hasMouseDown = true
hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}

Expand All @@ -145,7 +145,7 @@ class View: NSView, CALayerDelegate {
}

override func rightMouseDown(with event: NSEvent) {
hasMouseDown = true
hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}

Expand All @@ -155,7 +155,7 @@ class View: NSView, CALayerDelegate {
}

override func otherMouseDown(with event: NSEvent) {
hasMouseDown = true
hasMouseDown = event.clickCount <= 1
input?.processMouse(event: event)
}

Expand Down

0 comments on commit 92cb473

Please sign in to comment.