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
Unified · Split
| @@ -134,7 +134,7 @@ class View: NSView, CALayerDelegate { · 133 unmodified lines | ||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | override func mouseDown(with event: NSEvent) { |
| 137 | − hasMouseDown = true | |
| 137 | + hasMouseDown = event.clickCount <= 1 | |
| 138 | 138 | input?.processMouse(event: event) |
| 139 | 139 | } |
| 140 | 140 | |
| @@ -145,7 +145,7 @@ class View: NSView, CALayerDelegate { · 4 unmodified lines | ||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | override func rightMouseDown(with event: NSEvent) { |
| 148 | − hasMouseDown = true | |
| 148 | + hasMouseDown = event.clickCount <= 1 | |
| 149 | 149 | input?.processMouse(event: event) |
| 150 | 150 | } |
| 151 | 151 | |
| @@ -155,7 +155,7 @@ class View: NSView, CALayerDelegate { · 3 unmodified lines | ||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | override func otherMouseDown(with event: NSEvent) { |
| 158 | − hasMouseDown = true | |
| 158 | + hasMouseDown = event.clickCount <= 1 | |
| 159 | 159 | input?.processMouse(event: event) |
| 160 | 160 | } |
| 161 | 161 | |