summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LICENSE1
-rw-r--r--dwm.c13
2 files changed, 12 insertions, 2 deletions
diff --git a/LICENSE b/LICENSE
index dc2326a..4fbb67e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,7 @@
1MIT/X Consortium License 1MIT/X Consortium License
2 2
3© 2006-2014 Anselm R Garbe <anselm@garbe.us> 3© 2006-2014 Anselm R Garbe <anselm@garbe.us>
4© 2010-2014 Hiltjo Posthuma <hiltjo@codemadness.org>
4© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com> 5© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
5© 2010-2011 Connor Lane Smith <cls@lubutu.com> 6© 2010-2011 Connor Lane Smith <cls@lubutu.com>
6© 2006-2009 Jukka Salmi <jukka at salmi dot ch> 7© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
diff --git a/dwm.c b/dwm.c
index ffc8864..f896170 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1123,6 +1123,7 @@ movemouse(const Arg *arg) {
1123 Client *c; 1123 Client *c;
1124 Monitor *m; 1124 Monitor *m;
1125 XEvent ev; 1125 XEvent ev;
1126 Time lasttime = 0;
1126 1127
1127 if(!(c = selmon->sel)) 1128 if(!(c = selmon->sel))
1128 return; 1129 return;
@@ -1145,6 +1146,10 @@ movemouse(const Arg *arg) {
1145 handler[ev.type](&ev); 1146 handler[ev.type](&ev);
1146 break; 1147 break;
1147 case MotionNotify: 1148 case MotionNotify:
1149 if ((ev.xmotion.time - lasttime) <= (1000 / 60))
1150 continue;
1151 lasttime = ev.xmotion.time;
1152
1148 nx = ocx + (ev.xmotion.x - x); 1153 nx = ocx + (ev.xmotion.x - x);
1149 ny = ocy + (ev.xmotion.y - y); 1154 ny = ocy + (ev.xmotion.y - y);
1150 if(nx >= selmon->wx && nx <= selmon->wx + selmon->ww 1155 if(nx >= selmon->wx && nx <= selmon->wx + selmon->ww
@@ -1264,11 +1269,11 @@ resizeclient(Client *c, int x, int y, int w, int h) {
1264 1269
1265void 1270void
1266resizemouse(const Arg *arg) { 1271resizemouse(const Arg *arg) {
1267 int ocx, ocy; 1272 int ocx, ocy, nw, nh;
1268 int nw, nh;
1269 Client *c; 1273 Client *c;
1270 Monitor *m; 1274 Monitor *m;
1271 XEvent ev; 1275 XEvent ev;
1276 Time lasttime = 0;
1272 1277
1273 if(!(c = selmon->sel)) 1278 if(!(c = selmon->sel))
1274 return; 1279 return;
@@ -1290,6 +1295,10 @@ resizemouse(const Arg *arg) {
1290 handler[ev.type](&ev); 1295 handler[ev.type](&ev);
1291 break; 1296 break;
1292 case MotionNotify: 1297 case MotionNotify:
1298 if ((ev.xmotion.time - lasttime) <= (1000 / 60))
1299 continue;
1300 lasttime = ev.xmotion.time;
1301
1293 nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1); 1302 nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
1294 nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1); 1303 nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
1295 if(c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww 1304 if(c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww