changeset: 1865:ce39e2fbfa2c
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Feb 13 01:20:09 2007 -0500
summary: Frames shouldn't snap to themselves on opaque moves
diff -r 45fc40a05910 -r ce39e2fbfa2c area.c
--- a/area.c Tue Feb 13 01:10:43 2007 -0500
+++ b/area.c Tue Feb 13 01:20:09 2007 -0500
@@ -241,7 +241,7 @@ place_client(Area *a, Client *c) {
|| c->size.flags & USPosition
|| c->size.flags & PPosition)
return;
- rects = rects_of_view(a->view, &num);
+ rects = rects_of_view(a->view, &num, nil);
if(!field) {
mx = screen->rect.width / 8;
my = screen->rect.height / 8;
diff -r 45fc40a05910 -r ce39e2fbfa2c client.c
--- a/client.c Tue Feb 13 01:10:43 2007 -0500
+++ b/client.c Tue Feb 13 01:20:09 2007 -0500
@@ -723,8 +723,9 @@ send_client(Frame *f, char *arg, Bool sw
if(!--j) break;
goto send_area;
}
- }else
- return Ebadvalue;
+ }
+ return Ebadvalue;
+
send_frame:
if(!swap) {
remove_frame(f);
diff -r 45fc40a05910 -r ce39e2fbfa2c mouse.c
--- a/mouse.c Tue Feb 13 01:10:43 2007 -0500
+++ b/mouse.c Tue Feb 13 01:20:09 2007 -0500
@@ -332,9 +332,14 @@ do_mouse_resize(Client *c, Bool grabbox,
f = c->sel;
floating = f->area->floating;
origin = frect = f->rect;
- rects = floating ? rects_of_view(f->area->view, &num) : nil;
- snap = floating ? screen->rect.height / 66 : 0;
cur = cursor[CurResize];
+ if(floating) {
+ rects = rects_of_view(f->area->view, &num, (grabbox ? c->frame : nil));
+ snap = screen->rect.height / 66;
+ }else{
+ rects = nil;
+ snap = 0;
+ }
if(align == CENTER) {
if(grabbox)
diff -r 45fc40a05910 -r ce39e2fbfa2c view.c
--- a/view.c Tue Feb 13 01:10:43 2007 -0500
+++ b/view.c Tue Feb 13 01:20:09 2007 -0500
@@ -248,7 +248,7 @@ arrange_view(View *v) {
}
XRectangle *
-rects_of_view(View *v, uint *num) {
+rects_of_view(View *v, uint *num, Frame *ignore) {
XRectangle *result;
Frame *f;
@@ -256,7 +256,8 @@ rects_of_view(View *v, uint *num) {
for(f=v->area->frame; f; f=f->anext, (*num)++);
result = ixp_emallocz(*num * sizeof(XRectangle));
for(f=v->area->frame; f; f=f->anext)
- *result++ = f->rect;
+ if(f != ignore)
+ *result++ = f->rect;
*result++ = screen->rect;
*result++ = screen->brect;
return result - *num;
diff -r 45fc40a05910 -r ce39e2fbfa2c wmii.h
--- a/wmii.h Tue Feb 13 01:10:43 2007 -0500
+++ b/wmii.h Tue Feb 13 01:20:09 2007 -0500
@@ -400,7 +400,7 @@ extern View *create_view(const char *nam
extern View *create_view(const char *name);
extern void focus_view(WMScreen *s, View *v);
extern void update_client_views(Client *c, char **tags);
-extern XRectangle *rects_of_view(View *v, uint *num);
+extern XRectangle *rects_of_view(View *v, uint *num, Frame *ignore);
extern View *view_of_id(ushort id);
extern void select_view(const char *arg);
extern void attach_to_view(View *v, Frame *f);
Received on Tue Feb 13 2007 - 07:22:42 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:15 UTC