mirror of
https://github.com/0intro/wmii
synced 2024-11-22 13:52:17 +03:00
Fix unfloating client via chording. Closes issue #144.
This commit is contained in:
parent
6826773d31
commit
b5442734cf
@ -34,6 +34,7 @@ static Rectangle
|
|||||||
framerect(Framewin *f) {
|
framerect(Framewin *f) {
|
||||||
Rectangle r;
|
Rectangle r;
|
||||||
Point p;
|
Point p;
|
||||||
|
int scrn;
|
||||||
|
|
||||||
r.min = ZP;
|
r.min = ZP;
|
||||||
if(f->orientation == OHoriz) {
|
if(f->orientation == OHoriz) {
|
||||||
@ -46,11 +47,15 @@ framerect(Framewin *f) {
|
|||||||
}
|
}
|
||||||
r = rectaddpt(r, f->pt);
|
r = rectaddpt(r, f->pt);
|
||||||
|
|
||||||
|
scrn = f->screen;
|
||||||
|
if (scrn == -1)
|
||||||
|
scrn = max(ownerscreen(f->f->r), 0);
|
||||||
|
|
||||||
/* Keep onscreen */
|
/* Keep onscreen */
|
||||||
p = ZP;
|
p = ZP;
|
||||||
p.x -= min(0, r.min.x);
|
p.x -= min(0, r.min.x);
|
||||||
p.x -= max(0, r.max.x - screens[f->screen]->r.max.x);
|
p.x -= max(0, r.max.x - screens[scrn]->r.max.x);
|
||||||
p.y -= max(0, r.max.y - screens[f->screen]->brect.min.y - Dy(r)/2);
|
p.y -= max(0, r.max.y - screens[scrn]->brect.min.y - Dy(r)/2);
|
||||||
return rectaddpt(r, p);
|
return rectaddpt(r, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user