Skip to content

Commit

Permalink
Draw background of movie zone to avoid glitching
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimbali committed Nov 8, 2021
1 parent 5ad2f1c commit f2a9ed6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pympress/media_overlays/vlc_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def __init__(self, *args, **kwargs):
self.player = self._instance.media_player_new() # before loading UI, needed to connect "map" signal

super(VlcOverlay, self).__init__(*args, **kwargs)
# Simple black background painting to avoid glitching outside of video area
self.movie_zone.connect('draw', lambda widget, context: context.paint())

event_manager = self.player.event_manager()
event_manager.event_attach(vlc.EventType.MediaPlayerEndReached, lambda e: GLib.idle_add(self.handle_end))
Expand Down

0 comments on commit f2a9ed6

Please sign in to comment.