commit ac4b0d22ea7b9734acda580bf307598ab0cc7f21
parent 4e7ef24b5254bb1cc528899e36a9adc6a290c277
Author: Kris Maglione <jg@suckless.org>
Date: Mon, 5 Feb 2007 06:00:23 -0500
Don't try to insert a frame after itself.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/mouse.c b/mouse.c
@@ -223,6 +223,8 @@ find_droppoint(Frame *frame, int x, int y, XRectangle *rect, Bool do_move) {
rect->height = f->rect.y - rect->y;
}
if(do_move) {
+ if(frame == f)
+ return;
if(a != frame->area)
send_to_area(a, frame->area, frame);
remove_frame(frame);
@@ -237,6 +239,8 @@ find_droppoint(Frame *frame, int x, int y, XRectangle *rect, Bool do_move) {
if(f->anext)
rect->height = (f->anext->rect.y - rect->y);
if(do_move) {
+ if(frame == f)
+ return;
if(a != frame->area)
send_to_area(a, frame->area, frame);
remove_frame(frame);