mirror of
https://github.com/dylanaraps/sowm.git
synced 2026-10-15 10:39:42 +00:00
sowm: intialize cursor buttons using loop to remove duplicate code
This commit is contained in:
1 file changed
+4
-7
@@ -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
Block a user