commit 8a89f37797b2179df81885119d3574af09085ad9
parent 2d6a829fe78effdb19ec274756aff8533d1ae22c
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Tue, 30 May 2006 11:14:08 +0200
merged
Diffstat:
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -137,6 +137,7 @@ focus_client(Client *c, Bool restack)
v->sel = i;
f->area->sel = idx_of_frame(f);
+ c->floating = !i;
if(restack)
restack_view(v);
else {
@@ -475,7 +476,7 @@ sel_client()
}
static void
-match_sizehints(Client *c, BlitzAlign stickycorner)
+match_sizehints(Client *c, int aidx, BlitzAlign stickycorner)
{
XSizeHints *s = &c->size;
Frame *f = c->frame.data[c->sel];
@@ -483,7 +484,7 @@ match_sizehints(Client *c, BlitzAlign stickycorner)
unsigned int dy = def.border + height_of_bar();
unsigned int hdiff, wdiff;
- if(c->floating && (s->flags & PMinSize)) {
+ if(!aidx && (s->flags & PMinSize)) {
if(f->rect.width < s->min_width + dx) {
wdiff = (s->min_width + dx) - f->rect.width;
f->rect.width += wdiff;
@@ -497,7 +498,7 @@ match_sizehints(Client *c, BlitzAlign stickycorner)
f->rect.y -= hdiff;
}
}
- if(c->floating && (s->flags & PMaxSize)) {
+ if(!aidx && (s->flags & PMaxSize)) {
if(f->rect.width > s->max_width + dx) {
wdiff = f->rect.width - (s->max_width + dx);
f->rect.width -= wdiff;
@@ -547,6 +548,7 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall)
{
Frame *f = c->frame.data[c->sel];
int fidx = idx_of_frame(f);
+ int aidx = idx_of_area(f->area);
BlitzAlign stickycorner;
if(f->rect.x != r->x &&
f->rect.x + f->rect.width == r->x + r->width) {
@@ -566,10 +568,10 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall)
f->rect = *r;
if((f->area->mode != Colstack) || (f->area->sel == fidx))
- match_sizehints(c, stickycorner);
+ match_sizehints(c, aidx, stickycorner);
if(!ignore_xcall) {
- if(c->floating &&
+ if(!aidx &&
(c->rect.width >= rect.width) &&
(c->rect.height >= rect.height))
{
diff --git a/cmd/wm/column.c b/cmd/wm/column.c
@@ -363,14 +363,13 @@ drop_move(Frame *f, XRectangle *new, XPoint *pt)
for(i = 1; (i < v->area.size) &&
!blitz_ispointinrect(pt->x, pt->y, &v->area.data[i]->rect); i++);
if(i < v->area.size) {
- int x = new->x + (new->width / 2);
- if(x < 0) {
+ if(pt->x <= 5) {
if(src->frame.size > 1 || idx_of_area(src) != 1) {
tgt = new_column(v, 0);
send_to_area(tgt, src, f->client);
}
}
- else if(x > rect.width) {
+ else if(pt->x >= rect.width - 5) {
if(src->frame.size > 1 || idx_of_area(src) != v->area.size - 1) {
tgt = new_column(v, v->area.size);
send_to_area(tgt, src, f->client);
diff --git a/rc/wmiirc b/rc/wmiirc
@@ -145,7 +145,7 @@ do
$MODKEY-[0-9])
xwrite /ctl view `echo $1 | sed 's/.*-//'`;;
$MODKEY-Return)
- xterm &;;
+ PATH="$OLD_PATH" xterm &;;
$MODKEY-Shift-$LEFT)
xwrite /tag/sel/sel/sel/ctl send prev;;
$MODKEY-Shift-$RIGHT)