From e6c9e33a3163de5293acc4aed805435fd5e359b8 Mon Sep 17 00:00:00 2001 From: der richter Date: Wed, 8 Jan 2020 20:58:54 +0100 Subject: cocoa-cb: add runtime dpi change and use proper fallback for initial dpi at the time of the initial dpi query the window is not instantiated yet. we use a proper fallback in that case, eg the target configured screen or the main screen if none is set. also change some weird oversight and a small optimisation. --- video/out/cocoa-cb/window.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out/cocoa-cb/window.swift') diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 25f144a38e..9e2c6e3122 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -476,7 +476,7 @@ class Window: NSWindow, NSWindowDelegate { func windowDidChangeBackingProperties(_ notification: Notification) { cocoaCB.layer?.contentsScale = backingScaleFactor - cocoaCB.flagEvents(VO_EVENT_WIN_STATE) + cocoaCB.flagEvents(VO_EVENT_DPI) } func windowWillStartLiveResize(_ notification: Notification) { -- cgit v1.2.3