summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa-cb/events_view.swift
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa-cb/events_view.swift')
-rw-r--r--video/out/cocoa-cb/events_view.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/cocoa-cb/events_view.swift b/video/out/cocoa-cb/events_view.swift
index 7cc6a4022d..7cc295f362 100644
--- a/video/out/cocoa-cb/events_view.swift
+++ b/video/out/cocoa-cb/events_view.swift
@@ -31,9 +31,9 @@ class EventsView: NSView {
override var acceptsFirstResponder: Bool { return true }
- init(frame frameRect: NSRect, cocoaCB ccb: CocoaCB) {
+ init(cocoaCB ccb: CocoaCB) {
cocoaCB = ccb
- super.init(frame: frameRect)
+ super.init(frame: NSMakeRect(0, 0, 960, 480))
autoresizingMask = [.viewWidthSizable, .viewHeightSizable]
wantsBestResolutionOpenGLSurface = true
register(forDraggedTypes: [NSFilenamesPboardType, NSURLPboardType])
@@ -249,6 +249,7 @@ class EventsView: NSView {
}
func canHideCursor() -> Bool {
+ if cocoaCB.window == nil { return false }
return !hasMouseDown && containsMouseLocation() && window!.isKeyWindow
}