cocoa-cb: don't deactivate mouse events completely with input-cursor=no

mouse events and the tracking area are needed for (un)hiding the new
title bar, which was broken when input-cursor=no was set. no tracking
area was ever created and set which completely deactivated any mouse
events. the specific mouse event functions were already deactivated
proactively and have the needed check. no events are being propagated to
the mpv core when input-cursor=no is set, even with an active tracking
area.
This commit is contained in:
Akemi 2018-03-08 21:24:07 +01:00 committed by Kevin Mitchell
parent b0da883b13
commit 4485e205b9
1 changed files with 2 additions and 7 deletions

View File

@ -48,10 +48,6 @@ class EventsView: NSView {
removeTrackingArea(tracker!)
}
if mpv != nil && !mpv.getBoolProperty("input-cursor") {
return
}
tracker = NSTrackingArea(rect: bounds,
options: [.activeAlways, .mouseEnteredAndExited, .mouseMoved, .enabledDuringMouseDrag],
owner: self, userInfo: nil)
@ -88,12 +84,11 @@ class EventsView: NSView {
}
override func acceptsFirstMouse(for event: NSEvent?) -> Bool {
return mpv.getBoolProperty("input-cursor")
return true
}
override func becomeFirstResponder() -> Bool {
return mpv.getBoolProperty("input-cursor") ||
mpv.getBoolProperty("input-vo-keyboard")
return true
}
override func resignFirstResponder() -> Bool {