Thought BadWindow was a return status on failure. In fact its 0, thats why fluxbox sometimes crashes when freeing the malformed structure.
Gregor Bollerhey gbsoftware@arcor.de
1 files changed,
3 insertions(+),
5 deletions(-)
jump to
M
src/SystemTray.cc
→
src/SystemTray.cc
@@ -599,13 +599,11 @@ TrayWindow *i) {
// based on the parsed order list and a given window returns an // ordinal used to sort the tray icons. - auto Xdeleter = [](XClassHint *x){XFree(x);}; - - std::unique_ptr<XClassHint, decltype(Xdeleter)> - xclasshint (XAllocClassHint(), Xdeleter); + std::unique_ptr<XClassHint, int(*)(void*)> + xclasshint(XAllocClassHint(), XFree); if(XGetClassHint(Fluxbox::instance()->display(), - i->window(), xclasshint.get()) != BadWindow) + i->window(), xclasshint.get())) { std::string classname(xclasshint.get()->res_class);