Dispose cairo contexts in osdWindow and screenShield

Need to manually dispose of cairo contexts used in gjs with $dispose(),
or the context object will leak. These classes used cairo for drawing but
were missing the dispose call.

https://bugzilla.gnome.org/show_bug.cgi?id=722812
This commit is contained in:
Matt Watson 2014-01-22 19:10:21 -08:00 committed by Cosimo Cecchi
parent ccfc9f3ab0
commit 7c8c811134
2 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ const LevelBar = new Lang.Class({
cr.arc(radius, h - radius, radius, 0.5 * Math.PI, Math.PI);
cr.arc(radius, radius, radius, Math.PI, 1.5 * Math.PI);
cr.fill();
cr.$dispose();
}
});

View File

@ -413,6 +413,7 @@ const Arrow = new Lang.Class({
cr.lineTo(w/2, thickness);
cr.lineTo(w - thickness / 2, h - thickness / 2);
cr.stroke();
cr.$dispose();
},
vfunc_style_changed: function() {