config: make refreshrate for mouse move/resize a config option 74edc27c
Bump the default from 60 to 120.
Hiltjo Posthuma · 2025-08-12 19:17 2 file(s) · +3 −2
config.def.h +1 −0
36 36
static const int nmaster     = 1;    /* number of clients in master area */
37 37
static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
38 38
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
39 +
static const int refreshrate = 120;  /* refresh rate (per second) for client move/resize */
39 40
40 41
static const Layout layouts[] = {
41 42
	/* symbol     arrange function */
dwm.c +2 −2
1171 1171
			handler[ev.type](&ev);
1172 1172
			break;
1173 1173
		case MotionNotify:
1174 -
			if ((ev.xmotion.time - lasttime) <= (1000 / 60))
1174 +
			if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
1175 1175
				continue;
1176 1176
			lasttime = ev.xmotion.time;
1177 1177
1325 1325
			handler[ev.type](&ev);
1326 1326
			break;
1327 1327
		case MotionNotify:
1328 -
			if ((ev.xmotion.time - lasttime) <= (1000 / 60))
1328 +
			if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
1329 1329
				continue;
1330 1330
			lasttime = ev.xmotion.time;
1331 1331