[hackers] [wmii] Better managed mode grabbox moving.

From: Kris Maglione <jg_AT_suckless.org>
Date: Fri, 01 Jun 2007 01:09:47 -0000

changeset: 2104:0854dc582fba
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Apr 20 19:35:46 2007 -0400
summary: Better managed mode grabbox moving.

diff -r cf541c11c61f -r 0854dc582fba cmd/wmii/area.c
--- a/cmd/wmii/area.c Fri Apr 20 18:47:02 2007 -0400
+++ b/cmd/wmii/area.c Fri Apr 20 19:35:46 2007 -0400
@@ -173,7 +173,7 @@ attach_to_area(Area *a, Frame *f, Bool s
         c->floating = a->floating;
         if(!a->floating) {
                 f->r = a->r;
- f->r.max.y = f->r.min.y + Dx(a->r) / n_frame;
+ f->r.max.y = f->r.min.y + Dy(a->r) / n_frame;
         }
 
         insert_frame(a->sel, f, False);
diff -r cf541c11c61f -r 0854dc582fba cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Fri Apr 20 18:47:02 2007 -0400
+++ b/cmd/wmii/mouse.c Fri Apr 20 19:35:46 2007 -0400
@@ -272,25 +272,35 @@ horiz:
                 case ButtonRelease:
                         switch(ev.xbutton.button) {
                         case 1:
- if(f->anext && (f->aprev && fw->fp != f->aprev->aprev))
+ if(f->anext && (f->aprev && fw->fp != f->aprev->aprev)) {
                                         f->anext->r.min.y = f->r.min.y;
+ resize_frame(f->anext, f->anext->r);
+ }
                                 else if(f->aprev && fw->fp == f->aprev->aprev) {
                                         fw->fp = f->aprev->aprev;
                                         f->aprev->r = f->r;
                                 }
- else if(fw->fp)
- fw->fp->r.max.y = f->r.max.y;
- if(fw->ra != f->area)
- send_to_area(fw->ra, f);
+ else
+ f->aprev->r.max.y = f->r.max.y;
+ resize_frame(f->aprev, f->aprev->r);
+
                                 remove_frame(f);
+ f->area = fw->ra;
                                 insert_frame(fw->fp, f, False);
- if(fw->fp)
- fw->fp->r.max.y= fw->fr.min.y;
+
+ if(f->aprev) {
+ f->aprev->r.max.y = fw->fr.min.y;
+ resize_frame(f->aprev, f->aprev->r);
+ }
+ else
+ fw->fr.min.y = f->area->r.min.y;
                                 if(f->anext)
                                         fw->fr.max.y = f->anext->r.min.y;
                                 else
                                         fw->fr.max.y = f->area->r.max.y;
- resize_colframe(f, &fw->fr);
+ resize_frame(f, fw->fr);
+
+ arrange_view(f->view);
                                 goto done;
                         }
                         break;
Received on Fri Jun 01 2007 - 03:09:46 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:00 UTC