mirror of https://github.com/0intro/wmii
merged
This commit is contained in:
commit
8a89f37797
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue