diff options
| author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2025-08-12 19:17:20 +0200 |
|---|---|---|
| committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2025-08-12 19:17:20 +0200 |
| commit | 74edc27caa65aba9ea8d1fe03d26e3b449f79590 (patch) | |
| tree | 51316d0c821a3c9401132099738e8dc75bd86779 | |
| parent | bump version to 6.6 (diff) | |
| download | dwm-74edc27caa65aba9ea8d1fe03d26e3b449f79590.tar.gz dwm-74edc27caa65aba9ea8d1fe03d26e3b449f79590.zip | |
config: make refreshrate for mouse move/resize a config option
Bump the default from 60 to 120.
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 1 | ||||
| -rw-r--r-- | dwm.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index 9efa774..81c3fc0 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -36,6 +36,7 @@ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] | |||
| 36 | static const int nmaster = 1; /* number of clients in master area */ | 36 | static const int nmaster = 1; /* number of clients in master area */ |
| 37 | static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ | 37 | static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ |
| 38 | static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ | 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 | static const Layout layouts[] = { | 41 | static const Layout layouts[] = { |
| 41 | /* symbol arrange function */ | 42 | /* symbol arrange function */ |
| @@ -1171,7 +1171,7 @@ movemouse(const Arg *arg) | |||
| 1171 | handler[ev.type](&ev); | 1171 | handler[ev.type](&ev); |
| 1172 | break; | 1172 | break; |
| 1173 | case MotionNotify: | 1173 | case MotionNotify: |
| 1174 | if ((ev.xmotion.time - lasttime) <= (1000 / 60)) | 1174 | if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate)) |
| 1175 | continue; | 1175 | continue; |
| 1176 | lasttime = ev.xmotion.time; | 1176 | lasttime = ev.xmotion.time; |
| 1177 | 1177 | ||
| @@ -1325,7 +1325,7 @@ resizemouse(const Arg *arg) | |||
| 1325 | handler[ev.type](&ev); | 1325 | handler[ev.type](&ev); |
| 1326 | break; | 1326 | break; |
| 1327 | case MotionNotify: | 1327 | case MotionNotify: |
| 1328 | if ((ev.xmotion.time - lasttime) <= (1000 / 60)) | 1328 | if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate)) |
| 1329 | continue; | 1329 | continue; |
| 1330 | lasttime = ev.xmotion.time; | 1330 | lasttime = ev.xmotion.time; |
| 1331 | 1331 | ||
