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:
parent
ccfc9f3ab0
commit
7c8c811134
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user