History

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

der richter committed 2 years ago

Commit 92cb4731 parent ba45f201 file · +3 −3Browse files

Unified · Split

video/out/mac/view.swift+3−3
@@ -134,7 +134,7 @@ class View: NSView, CALayerDelegate { · 133 unmodified lines
134134 }
135135
136136 override func mouseDown(with event: NSEvent) {
137− hasMouseDown = true
137+ hasMouseDown = event.clickCount <= 1
138138 input?.processMouse(event: event)
139139 }
140140
@@ -145,7 +145,7 @@ class View: NSView, CALayerDelegate { · 4 unmodified lines
145145 }
146146
147147 override func rightMouseDown(with event: NSEvent) {
148− hasMouseDown = true
148+ hasMouseDown = event.clickCount <= 1
149149 input?.processMouse(event: event)
150150 }
151151
@@ -155,7 +155,7 @@ class View: NSView, CALayerDelegate { · 3 unmodified lines
155155 }
156156
157157 override func otherMouseDown(with event: NSEvent) {
158− hasMouseDown = true
158+ hasMouseDown = event.clickCount <= 1
159159 input?.processMouse(event: event)
160160 }
161161

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t