~ubuntu-branches/ubuntu/trusty/banshee/trusty-updates

« back to all changes in this revision

Viewing changes to src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/VideoDisplay.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-02-09 23:06:03 UTC
  • mfrom: (1.2.26) (150.1.2 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140209230603-7dhbveo058j96ea0
* [fbf05ca] Imported Upstream version 2.9.0+really2.6.1:
  Downgrade to 2.6.1 -- 2.9.x is unstable and 3.0 won't arrive in time for
  release
* [22de440] Revert packaging to 2.6.1-2ubuntu1
* [7357b73] Merge changes from 2.6.1-5
* [a7156c0] Filter out libgpod-cil-dev versions built against gtk#3
* [e7c634d] Update dversionmangle for extracting +really version out

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
        protected abstract Gdk.Window RenderWindow { get; }
58
58
 
59
 
        protected abstract void ExposeVideo ();
 
59
        protected abstract void ExposeVideo (Gdk.EventExpose evnt);
60
60
 
61
61
        protected override void OnDestroyed ()
62
62
        {
64
64
            ServiceManager.PlayerEngine.DisconnectEvent (OnPlayerEvent);
65
65
        }
66
66
 
67
 
        protected override bool OnDrawn (Cairo.Context cr)
 
67
        protected override bool OnExposeEvent (Gdk.EventExpose evnt)
68
68
        {
69
 
            // We want to draw on RenderWindow so we need another Cairo.Context
70
 
            using (var cr_window = Gdk.CairoHelper.Create (RenderWindow)) {
71
 
                cr_window.SetSourceRGB (0.0, 0.0, 0.0);
72
 
                cr_window.Rectangle (0, 0, Allocation.Width, Allocation.Height);
73
 
                cr_window.Paint ();
74
 
            }
 
69
            RenderWindow.DrawRectangle (Style.BlackGC, true,
 
70
                new Gdk.Rectangle (0, 0, Allocation.Width, Allocation.Height));
75
71
 
76
72
            if (RenderWindow == null || !RenderWindow.IsVisible) {
77
73
                return true;
78
74
            }
79
75
 
80
76
            if (!is_idle && ServiceManager.PlayerEngine.VideoDisplayContextType != VideoDisplayContextType.Unsupported) {
81
 
                ExposeVideo ();
 
77
                ExposeVideo (evnt);
82
78
            }
83
79
 
84
80
            return true;