[wiki] [sites] [dwm][patch][refreshrate] add patch || sewn

From: <git_AT_suckless.org>
Date: Sat, 26 Aug 2023 22:08:15 +0200

commit fd01cf4811aab4e7994b19e2233753907b0f62a8
Author: sewn <sewn_AT_disroot.org>
Date: Sat Aug 26 23:07:49 2023 +0300

    [dwm][patch][refreshrate] add patch

diff --git a/dwm.suckless.org/patches/refreshrate/dwm-refreshrate-20230826-9554a10.diff b/dwm.suckless.org/patches/refreshrate/dwm-refreshrate-20230826-9554a10.diff
new file mode 100644
index 00000000..75facd06
--- /dev/null
+++ b/dwm.suckless.org/patches/refreshrate/dwm-refreshrate-20230826-9554a10.diff
_AT_@ -0,0 +1,56 @@
+From 9554a109e240789f76f0ece3e62f9014ceb8a4bc Mon Sep 17 00:00:00 2001
+From: sewn <sewn_AT_disroot.org>
+Date: Sat, 26 Aug 2023 22:57:51 +0300
+Subject: [PATCH] dwm: remove resize/move limitation
+
+we have modern machines, and we have high refresh rate monitors;
+this makes resizing and moving windows have no limit when refreshing.
+---
+ dwm.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index f1d86b2..4c00cbe 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1149,7 +1149,6 @@ movemouse(const Arg *arg)
+ Client *c;
+ Monitor *m;
+ XEvent ev;
+- Time lasttime = 0;
+
+ if (!(c = selmon->sel))
+ return;
+_AT_@ -1172,10 +1171,6 @@ movemouse(const Arg *arg)
+ handler[ev.type](&ev);
+ break;
+ case MotionNotify:
+- if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+- continue;
+- lasttime = ev.xmotion.time;
+-
+ nx = ocx + (ev.xmotion.x - x);
+ ny = ocy + (ev.xmotion.y - y);
+ if (abs(selmon->wx - nx) < snap)
+_AT_@ -1304,7 +1299,6 @@ resizemouse(const Arg *arg)
+ Client *c;
+ Monitor *m;
+ XEvent ev;
+- Time lasttime = 0;
+
+ if (!(c = selmon->sel))
+ return;
+_AT_@ -1326,10 +1320,6 @@ resizemouse(const Arg *arg)
+ handler[ev.type](&ev);
+ break;
+ case MotionNotify:
+- if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+- continue;
+- lasttime = ev.xmotion.time;
+-
+ nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
+ nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
+ if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
+--
+2.42.0
+
diff --git a/dwm.suckless.org/patches/refreshrate/index.md b/dwm.suckless.org/patches/refreshrate/index.md
new file mode 100644
index 00000000..99c68e51
--- /dev/null
+++ b/dwm.suckless.org/patches/refreshrate/index.md
_AT_@ -0,0 +1,18 @@
+refreshrate
+========
+
+Description
+-----------
+This patch removes the resize/move limitation introduced in commit
+3d1090ba896319368c4771b88d325fcee368a608.
+
+This makes resizing and moving alot smoother by removing the limitation
+of amount of updates of 60 times per second.
+
+Download
+--------
+* [dwm-refreshrate-20230826-9554a10.diff](dwm-refreshrate-20230826-9554a10.diff)
+
+Author
+------
+* sewn <sewn_AT_disroot.org>
Received on Sat Aug 26 2023 - 22:08:15 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 26 2023 - 22:13:10 CEST