]> Skullheadx's Git Forge - dwm.git/commitdiff
config: make refreshrate for mouse move/resize a config option
authorHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 12 Aug 2025 17:17:20 +0000 (19:17 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 12 Aug 2025 17:17:20 +0000 (19:17 +0200)
Bump the default from 60 to 120.

config.def.h
dwm.c

index 9efa7744b39c8b0ff0cf09a504a2539910c2881c..81c3fc0c207b6ac44c7036f18ecb6c1cae00641e 100644 (file)
@@ -36,6 +36,7 @@ static const float mfact     = 0.55; /* factor of master area size [0.05..0.95]
 static const int nmaster     = 1;    /* number of clients in master area */
 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
+static const int refreshrate = 120;  /* refresh rate (per second) for client move/resize */
 
 static const Layout layouts[] = {
        /* symbol     arrange function */
diff --git a/dwm.c b/dwm.c
index 14438024ca4a5fa85eb2a779da4f8771f124854f..4cf07eb498a9db92c0918505ba0247559850ade4 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -1171,7 +1171,7 @@ movemouse(const Arg *arg)
                        handler[ev.type](&ev);
                        break;
                case MotionNotify:
-                       if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+                       if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
                                continue;
                        lasttime = ev.xmotion.time;
 
@@ -1325,7 +1325,7 @@ resizemouse(const Arg *arg)
                        handler[ev.type](&ev);
                        break;
                case MotionNotify:
-                       if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+                       if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
                                continue;
                        lasttime = ev.xmotion.time;