Only grab the mouse buttons that need to be grabbed. (#2290)
This is a followup to #2049. While we had fixed that bug by only grabbing buttons 4 and 5 if there is a whole-window binding for that button, this did not consider buttons higher than 5 as found on many mice. Therefore, we now ditch the special handling for scrollwheel buttons and instead do the same for all buttons higher than 3. fixes #2271
This commit is contained in:
committed by
Michael Stapelberg
parent
0060586190
commit
83c8740bf1
@ -170,7 +170,9 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
|
||||
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);
|
||||
|
Reference in New Issue
Block a user