changeset: 2003:a577a2a3f2b0
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Mar 06 02:04:19 2007 -0500
summary: Fix some bugs with floating clients tagged with multiple views.
diff -r 6631877cbc7d -r a577a2a3f2b0 area.c
--- a/area.c Mon Mar 05 14:56:36 2007 -0500
+++ b/area.c Tue Mar 06 02:04:19 2007 -0500
@@ -9,7 +9,7 @@
#include <math.h>
#include "wmii.h"
-static void place_client(Area *a, Client *c);
+static void place_frame(Frame *f);
Client *
sel_client_of_area(Area *a) {
@@ -144,11 +144,19 @@ attach_to_area(Area *a, Frame *f, Bool s
insert_frame(a->sel, f, False);
- if(a->floating)
- place_client(a, c);
+ if(a->floating) {
+ fprintf(stderr, "a: f=%p (%s) %d,%d %dx%d\n",
+ f, f->client->name,
+ f->rect.x, f->rect.y, f->rect.width, f->rect.height);
+ place_frame(f);
+ fprintf(stderr, "b: f=%p (%s) %d,%d %dx%d\n",
+ f, f->client->name,
+ f->rect.x, f->rect.y, f->rect.width, f->rect.height);
+ }
focus_frame(f, False);
resize_frame(f, &f->rect);
+ restack_view(a->view);
if(!a->floating)
arrange_column(a, False);
else
@@ -241,7 +249,7 @@ bit_get(uint *field, uint width, uint x,
}
static void
-place_client(Area *a, Client *c) {
+place_frame(Frame *f) {
enum { devisor = sizeof(uint) * 8 };
enum { dx = 8, dy = 8 };
static uint mwidth, mx, my;
@@ -250,7 +258,9 @@ place_client(Area *a, Client *c) {
XPoint p1 = {0, 0};
XPoint p2 = {0, 0};
XRectangle *rects;
- Frame *f, *fr;
+ Frame *fr;
+ Client *c;
+ Area *a;
Bool fit;
uint i, j, x, y, cx, cy, maxx, maxy, diff, num;
int snap;
@@ -260,7 +270,8 @@ place_client(Area *a, Client *c) {
fit = False;
align = CENTER;
- f = c->sel;
+ a = f->area;
+ c = f->client;
if(c->trans)
return;
diff -r 6631877cbc7d -r a577a2a3f2b0 client.c
--- a/client.c Mon Mar 05 14:56:36 2007 -0500
+++ b/client.c Tue Mar 06 02:04:19 2007 -0500
@@ -182,7 +182,7 @@ frame_of_win(Window w) {
for(c=client; c; c=c->next)
if(c->framewin == w) break;
if(c)
- return c->frame;
+ return c->sel;
return nil;
}
diff -r 6631877cbc7d -r a577a2a3f2b0 view.c
--- a/view.c Mon Mar 05 14:56:36 2007 -0500
+++ b/view.c Tue Mar 06 02:04:19 2007 -0500
@@ -125,6 +125,7 @@ focus_view(WMScreen *s, View *v) {
unmap_client(c, IconicState);
}
}
+ restack_view(v);
focus_area(v->sel);
draw_frames();
XSync(blz.dpy, False);
@@ -166,6 +167,9 @@ restack_view(View *v) {
uint n, i;
static Window *wins = nil;
static uint winssz = 0;
+
+ if(v != screen->sel)
+ return;
i = 0;
n = 0;
Received on Tue Mar 06 2007 - 08:06:37 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:12 UTC