Applied code style on merged changes
This commit is contained in:
parent
ce8460108a
commit
9ee34477f8
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION = git-20130211
|
VERSION = git-20130304
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
15
commands.c
15
commands.c
|
@ -262,6 +262,11 @@ Bool is_motionnotify(Display *d, XEvent *e, XPointer a)
|
||||||
return e != NULL && e->type == MotionNotify;
|
return e != NULL && e->type == MotionNotify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WARP(x,y) \
|
||||||
|
XWarpPointer(win.env.dpy, None, win.xwin, 0, 0, 0, 0, x, y); \
|
||||||
|
ox = x, oy = y; \
|
||||||
|
break
|
||||||
|
|
||||||
bool i_drag(arg_t a)
|
bool i_drag(arg_t a)
|
||||||
{
|
{
|
||||||
int dx = 0, dy = 0, i, ox, oy, x, y;
|
int dx = 0, dy = 0, i, ox, oy, x, y;
|
||||||
|
@ -290,14 +295,6 @@ bool i_drag(arg_t a)
|
||||||
x = e.xmotion.x;
|
x = e.xmotion.x;
|
||||||
y = e.xmotion.y;
|
y = e.xmotion.y;
|
||||||
|
|
||||||
#define WARP(x, y) \
|
|
||||||
XWarpPointer(win.env.dpy, \
|
|
||||||
None, win.xwin, \
|
|
||||||
0, 0, 0, 0, \
|
|
||||||
x, y); \
|
|
||||||
ox = x, oy = y; \
|
|
||||||
break
|
|
||||||
|
|
||||||
/* wrap the mouse around */
|
/* wrap the mouse around */
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
WARP(win.w, y);
|
WARP(win.w, y);
|
||||||
|
@ -308,10 +305,8 @@ bool i_drag(arg_t a)
|
||||||
} else if (y > win.h) {
|
} else if (y > win.h) {
|
||||||
WARP(x, 0);
|
WARP(x, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
dx += x - ox;
|
dx += x - ox;
|
||||||
dy += y - oy;
|
dy += y - oy;
|
||||||
|
|
||||||
ox = x;
|
ox = x;
|
||||||
oy = y;
|
oy = y;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue