This commit is contained in:
Anselm R. Garbe 2006-05-30 11:14:08 +02:00
commit 8a89f37797
3 changed files with 10 additions and 9 deletions

View File

@ -137,6 +137,7 @@ focus_client(Client *c, Bool restack)
v->sel = i; v->sel = i;
f->area->sel = idx_of_frame(f); f->area->sel = idx_of_frame(f);
c->floating = !i;
if(restack) if(restack)
restack_view(v); restack_view(v);
else { else {
@ -475,7 +476,7 @@ sel_client()
} }
static void static void
match_sizehints(Client *c, BlitzAlign stickycorner) match_sizehints(Client *c, int aidx, BlitzAlign stickycorner)
{ {
XSizeHints *s = &c->size; XSizeHints *s = &c->size;
Frame *f = c->frame.data[c->sel]; 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 dy = def.border + height_of_bar();
unsigned int hdiff, wdiff; unsigned int hdiff, wdiff;
if(c->floating && (s->flags & PMinSize)) { if(!aidx && (s->flags & PMinSize)) {
if(f->rect.width < s->min_width + dx) { if(f->rect.width < s->min_width + dx) {
wdiff = (s->min_width + dx) - f->rect.width; wdiff = (s->min_width + dx) - f->rect.width;
f->rect.width += wdiff; f->rect.width += wdiff;
@ -497,7 +498,7 @@ match_sizehints(Client *c, BlitzAlign stickycorner)
f->rect.y -= hdiff; f->rect.y -= hdiff;
} }
} }
if(c->floating && (s->flags & PMaxSize)) { if(!aidx && (s->flags & PMaxSize)) {
if(f->rect.width > s->max_width + dx) { if(f->rect.width > s->max_width + dx) {
wdiff = f->rect.width - (s->max_width + dx); wdiff = f->rect.width - (s->max_width + dx);
f->rect.width -= wdiff; f->rect.width -= wdiff;
@ -547,6 +548,7 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall)
{ {
Frame *f = c->frame.data[c->sel]; Frame *f = c->frame.data[c->sel];
int fidx = idx_of_frame(f); int fidx = idx_of_frame(f);
int aidx = idx_of_area(f->area);
BlitzAlign stickycorner; BlitzAlign stickycorner;
if(f->rect.x != r->x && if(f->rect.x != r->x &&
f->rect.x + f->rect.width == r->x + r->width) { 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; f->rect = *r;
if((f->area->mode != Colstack) || (f->area->sel == fidx)) if((f->area->mode != Colstack) || (f->area->sel == fidx))
match_sizehints(c, stickycorner); match_sizehints(c, aidx, stickycorner);
if(!ignore_xcall) { if(!ignore_xcall) {
if(c->floating && if(!aidx &&
(c->rect.width >= rect.width) && (c->rect.width >= rect.width) &&
(c->rect.height >= rect.height)) (c->rect.height >= rect.height))
{ {

View File

@ -363,14 +363,13 @@ drop_move(Frame *f, XRectangle *new, XPoint *pt)
for(i = 1; (i < v->area.size) && for(i = 1; (i < v->area.size) &&
!blitz_ispointinrect(pt->x, pt->y, &v->area.data[i]->rect); i++); !blitz_ispointinrect(pt->x, pt->y, &v->area.data[i]->rect); i++);
if(i < v->area.size) { if(i < v->area.size) {
int x = new->x + (new->width / 2); if(pt->x <= 5) {
if(x < 0) {
if(src->frame.size > 1 || idx_of_area(src) != 1) { if(src->frame.size > 1 || idx_of_area(src) != 1) {
tgt = new_column(v, 0); tgt = new_column(v, 0);
send_to_area(tgt, src, f->client); 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) { if(src->frame.size > 1 || idx_of_area(src) != v->area.size - 1) {
tgt = new_column(v, v->area.size); tgt = new_column(v, v->area.size);
send_to_area(tgt, src, f->client); send_to_area(tgt, src, f->client);

View File

@ -145,7 +145,7 @@ do
$MODKEY-[0-9]) $MODKEY-[0-9])
xwrite /ctl view `echo $1 | sed 's/.*-//'`;; xwrite /ctl view `echo $1 | sed 's/.*-//'`;;
$MODKEY-Return) $MODKEY-Return)
xterm &;; PATH="$OLD_PATH" xterm &;;
$MODKEY-Shift-$LEFT) $MODKEY-Shift-$LEFT)
xwrite /tag/sel/sel/sel/ctl send prev;; xwrite /tag/sel/sel/sel/ctl send prev;;
$MODKEY-Shift-$RIGHT) $MODKEY-Shift-$RIGHT)