From 7973c15b06af4a5398770e8e1ad89f5bd62ec360 Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> Date: Wed, 2 Oct 2019 10:37:54 -0400 Subject: [PATCH] videoView: force redraw If window closed when video running metal view redrawing will broke. This patch force view redraw after setting a new frame. Change-Id: If6f1266510061dd7b9d04e95cacf58395fdb4220 --- src/RingWindowController.mm | 1 - src/views/CallMTKView.mm | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RingWindowController.mm b/src/RingWindowController.mm index bb0ab05a..b99afbc9 100644 --- a/src/RingWindowController.mm +++ b/src/RingWindowController.mm @@ -178,7 +178,6 @@ typedef NS_ENUM(NSInteger, ViewState) { [chooseAccountVC updateWithDelegate: self andModel:self.accountModel]; settingsVC = [[AccountSettingsVC alloc] initWithNibName:@"AccountSettings" bundle:nil accountmodel:self.accountModel]; [callView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [[currentCallVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [[conversationVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [[settingsVC view] setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; diff --git a/src/views/CallMTKView.mm b/src/views/CallMTKView.mm index f4441103..326041d4 100644 --- a/src/views/CallMTKView.mm +++ b/src/views/CallMTKView.mm @@ -215,6 +215,7 @@ bool frameDisplayed = false; [commandEncoder endEncoding]; [commandBuffer presentDrawable:drawable]; [commandBuffer commit]; + [self draw]; } -(simd::float4x4) getScalingMatrix:(CGFloat) ratio axis:(char) axis { -- GitLab