diff --git a/src/compton.c b/src/compton.c index 8a544bc..d927674 100644 --- a/src/compton.c +++ b/src/compton.c @@ -1332,9 +1332,12 @@ static void _draw_callback(EV_P_ session_t *ps, int revents attr_unused) { // Call fill_win on new windows handle_new_windows(ps); - auto r = xcb_get_input_focus_reply(ps->c, xcb_get_input_focus(ps->c), NULL); - if (!ps->active_win || (r && r->focus != ps->active_win->base.id)) { - recheck_focus(ps); + { + auto r = xcb_get_input_focus_reply(ps->c, xcb_get_input_focus(ps->c), NULL); + if (!ps->active_win || (r && r->focus != ps->active_win->base.id)) { + recheck_focus(ps); + } + free(r); } // Refresh pixmaps