Skip to content

Commit c50106f

Browse files
author
Dmitry Lavnikevich
committed
Make button8 and button9 grab window without modifier
Unlike buttons 1-3 these two can be used solely for window resize/movement actions and so do not require modifier.
1 parent 7202c39 commit c50106f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pointer.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ void window_grab_buttons(xcb_window_t win)
5555
window_grab_button(win, BUTTONS[i], XCB_NONE);
5656
}
5757
if (pointer_actions[i] != ACTION_NONE) {
58-
window_grab_button(win, BUTTONS[i], pointer_modifier);
58+
if (BUTTONS[i] == 8 || BUTTONS[i] == 9) {
59+
window_grab_button(win, BUTTONS[i], 0);
60+
} else {
61+
window_grab_button(win, BUTTONS[i], pointer_modifier);
62+
}
5963
}
6064
}
6165
}

0 commit comments

Comments
 (0)