mirror of https://github.com/adamdruppe/arsd.git
Never free the default font in a destructor as it is a shared resource
This commit is contained in:
parent
af6533d774
commit
f149974c09
|
@ -7674,9 +7674,9 @@ class OperatingSystemFont {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(font)
|
if(font && font !is ScreenPainterImplementation.defaultfont)
|
||||||
XFreeFont(display, font);
|
XFreeFont(display, font);
|
||||||
if(fontset)
|
if(fontset && fontset !is ScreenPainterImplementation.defaultfontset)
|
||||||
XFreeFontSet(display, fontset);
|
XFreeFontSet(display, fontset);
|
||||||
|
|
||||||
font = null;
|
font = null;
|
||||||
|
@ -11053,12 +11053,14 @@ version(X11) {
|
||||||
xftDraw = null;
|
xftDraw = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
version(none) // we don't want to free it because we can use it later
|
if(font && font !is defaultfont) {
|
||||||
if(font)
|
|
||||||
XFreeFont(display, font);
|
XFreeFont(display, font);
|
||||||
version(none) // we don't want to free it because we can use it later
|
font = null;
|
||||||
if(fontset)
|
}
|
||||||
|
if(fontset && fontset !is defaultfontset) {
|
||||||
XFreeFontSet(display, fontset);
|
XFreeFontSet(display, fontset);
|
||||||
|
fontset = null;
|
||||||
|
}
|
||||||
XFlush(display);
|
XFlush(display);
|
||||||
|
|
||||||
if(window.paintingFinishedDg !is null)
|
if(window.paintingFinishedDg !is null)
|
||||||
|
|
Loading…
Reference in New Issue