cwindow->id = window;
cwindow->depth = get_visual_depth(attr->visual);
- xcb_grab_buttons(conn, window, bindings_should_grab_scrollwheel_buttons());
+ int *buttons = bindings_get_buttons_to_grab();
+ xcb_grab_buttons(conn, window, buttons);
+ FREE(buttons);
/* update as much information as possible so far (some replies may be NULL) */
window_update_class(cwindow, xcb_get_property_reply(conn, class_cookie, NULL), true);