sowm: intialize cursor buttons using loop to remove duplicate code
This commit is contained in:
parent
8bdffcacda
commit
43025432ac
11
sowm.c
11
sowm.c
|
@ -571,13 +571,10 @@ int main(void) {
|
|||
XSelectInput(d, root, SubstructureNotifyMask|
|
||||
SubstructureRedirectMask|EnterWindowMask|LeaveWindowMask);
|
||||
|
||||
XGrabButton(d, 1, MOD, root, True,
|
||||
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
|
||||
GrabModeAsync, GrabModeAsync, None, None);
|
||||
|
||||
XGrabButton(d, 3, MOD, root, True,
|
||||
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
|
||||
GrabModeAsync, GrabModeAsync, None, None);
|
||||
for (int i=1; i<4; i+=2)
|
||||
XGrabButton(d, i, MOD, root, True,
|
||||
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
|
||||
GrabModeAsync, GrabModeAsync, None, None);
|
||||
|
||||
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
||||
|
||||
|
|
Reference in New Issue