From b0932ecbb6b08de57a1429b71216eaa3cbe3882b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 10 Jul 2013 13:32:38 +0200 Subject: cocoa_common: change video size when changing screen DPI This improves the situation when moving a window from screens with different DPIs. --- video/out/cocoa_common.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index dc95e537a1..f8a4e44cd9 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -617,6 +617,14 @@ int vo_cocoa_cgl_color_size(struct vo *vo) s->did_resize = YES; } } + +- (void)windowDidChangeBackingProperties:(NSNotification *)notification { + if (self.videoOutput) { + struct vo_cocoa_state *s = self.videoOutput->cocoa; + s->did_resize = YES; + } +} + - (void)toggleMissionControlFullScreen:(BOOL)willBeFullscreen { struct vo_cocoa_state *s = self.videoOutput->cocoa; -- cgit v1.2.3