mirror of
https://github.com/0intro/wmii
synced 2025-01-26 12:02:23 +03:00
prevent some useless column destroy&recreate stuff
This commit is contained in:
parent
d302da9846
commit
622576bed6
@ -357,7 +357,7 @@ drop_move(Frame *f, XRectangle *new, XPoint *pt)
|
||||
int fidx;
|
||||
Frame *ft;
|
||||
|
||||
if(!pt)
|
||||
if(!pt || v->area.size < 2)
|
||||
return;
|
||||
|
||||
for(i = 1; (i < v->area.size) &&
|
||||
@ -365,12 +365,16 @@ drop_move(Frame *f, XRectangle *new, XPoint *pt)
|
||||
if(i < v->area.size) {
|
||||
int x = new->x + (new->width / 2);
|
||||
if(x < 0) {
|
||||
tgt = new_left_column(v);
|
||||
send_to_area(tgt, src, f->client);
|
||||
if(src->frame.size > 1 || src != v->area.data[1]) {
|
||||
tgt = new_left_column(v);
|
||||
send_to_area(tgt, src, f->client);
|
||||
}
|
||||
}
|
||||
else if(x > rect.width) {
|
||||
tgt = new_right_column(v);
|
||||
send_to_area(tgt, src, f->client);
|
||||
if(src->frame.size > 1 || src != v->area.data[v->area.size-1]) {
|
||||
tgt = new_right_column(v);
|
||||
send_to_area(tgt, src, f->client);
|
||||
}
|
||||
}
|
||||
else if(src != (tgt = v->area.data[i])) {
|
||||
Client *c = f->client;
|
||||
|
Loading…
Reference in New Issue
Block a user