changeset: 1739:2bed97c82408
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Feb 05 01:54:39 2007 -0500
files: event.c frame.c
description:
Fix a bug (I hope) in the swapping code
diff -r f99260f0230c -r 2bed97c82408 event.c
--- a/event.c Mon Feb 05 01:07:04 2007 -0500
+++ b/event.c Mon Feb 05 01:54:39 2007 -0500
@@ -91,7 +91,8 @@ buttonpress(XEvent *e) {
do_mouse_resize(f->client, CENTER);
break;
case Button3:
- do_mouse_resize(f->client, quadofcoord(&f->client->rect, ev->x, ev->y));
+ do_mouse_resize(f->client,
+ quadofcoord(&f->client->rect, ev->x, ev->y));
default:
break;
}
diff -r f99260f0230c -r 2bed97c82408 frame.c
--- a/frame.c Mon Feb 05 01:07:04 2007 -0500
+++ b/frame.c Mon Feb 05 01:54:39 2007 -0500
@@ -67,6 +67,7 @@ swap_frames(Frame *fa, Frame *fb) {
Frame **fp_a, **fp_b, *ft;
if(fa == fb) return;
+
a = fa->area;
for(fp_a = &a->frame; *fp_a; fp_a=&(*fp_a)->anext)
if(*fp_a == fa) break;
@@ -74,15 +75,15 @@ swap_frames(Frame *fa, Frame *fb) {
for(fp_b = &a->frame; *fp_b; fp_b=&(*fp_b)->anext)
if(*fp_b == fb) break;
+ ft = fa->anext;
+ fa->anext = fb->anext;
+ fb->anext = ft;
+
*fp_a = fb;
*fp_b = fa;
fb->area = fa->area;
fa->area = a;
-
- ft = fa->anext;
- fa->anext = fb->anext;
- fb->anext = ft;
trect = fa->rect;
fa->rect = fb->rect;
Received on Mon Feb 05 2007 - 08:00:07 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:53 UTC