Use XFree to free memory (not the default "delete").

This commit is contained in:
Gregor Bollerhey 2013-12-15 03:40:22 +01:00 committed by Jan Sucan
parent 7e762f0a97
commit c65f2ec6fb

View file

@ -592,7 +592,11 @@ static int client_to_ordinal(const std::vector<std::string> left,
const std::vector<std::string> right,
TrayWindow *i) {
std::unique_ptr<XClassHint> xclasshint (XAllocClassHint());
auto Xdeleter = [](XClassHint *x){XFree(x);};
std::unique_ptr<XClassHint, decltype(Xdeleter)>
xclasshint (XAllocClassHint(), Xdeleter);
if(XGetClassHint(Fluxbox::instance()->display(),
i->window(), xclasshint.get()) != BadWindow)
{