diff --git a/src/SystemTray.cc b/src/SystemTray.cc index 4b2cf56a..a5fcc791 100644 --- a/src/SystemTray.cc +++ b/src/SystemTray.cc @@ -592,7 +592,11 @@ static int client_to_ordinal(const std::vector left, const std::vector right, TrayWindow *i) { - std::unique_ptr xclasshint (XAllocClassHint()); + auto Xdeleter = [](XClassHint *x){XFree(x);}; + + std::unique_ptr + xclasshint (XAllocClassHint(), Xdeleter); + if(XGetClassHint(Fluxbox::instance()->display(), i->window(), xclasshint.get()) != BadWindow) {