[vlc-commits] [Git][videolan/vlc][master] macosx: fix potential cgcontext drawing errors

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jul 19 11:41:40 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2f627834 by Maxime Chapelet at 2023-07-19T11:26:17+00:00
macosx: fix potential cgcontext drawing errors

Direct call to `-[NSView drawRect:]` would cause subsequent drawing failures as the graphics context won't be available in this case.
`-[NSView setNeedsDisplay:YES]` fixes this problem.

- - - - -


1 changed file:

- modules/gui/macosx/windows/video/VLCMainVideoViewController.m


Changes:

=====================================
modules/gui/macosx/windows/video/VLCMainVideoViewController.m
=====================================
@@ -358,7 +358,7 @@
     _playlistButtonTrailingConstraint.constant = placeInFakeToolbar ? realButtonSpace: VLCLibraryUIUnits.largeSpacing;
 
     _overlayView.drawGradientForTopControls = !placeInFakeToolbar;
-    [_overlayView drawRect:_overlayView.frame];
+    [_overlayView setNeedsDisplay:YES];
 }
 
 - (IBAction)togglePlaylist:(id)sender



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2f62783422c4a60943bfcd2784fe9b8b206b25aa

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2f62783422c4a60943bfcd2784fe9b8b206b25aa
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list