Use XFree to free memory (not the default "delete").
This commit is contained in:
parent
7e762f0a97
commit
c65f2ec6fb
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue