24 lines
482 B
C
24 lines
482 B
C
void centerfloattile(Monitor *m) {
|
|
if (!m->sel) return;
|
|
|
|
if (m->sel->isfloating && !m->sel->isfullscreen && !m->sel->isfixed && m->sel->x == 0 && m->sel->y == 0) {
|
|
int x = (m->mw - m->sel->w) / 2;
|
|
int y = (m->mh - m->sel->h) / 2;
|
|
resize(m->sel, x, y, m->sel->w, m->sel->h, 0);
|
|
}
|
|
|
|
tile(m);
|
|
}
|
|
|
|
void togglefullscreen() {
|
|
if (selmon->sel == 0) {
|
|
return;
|
|
}
|
|
|
|
if (selmon->sel->isfullscreen) {
|
|
setfullscreen(selmon->sel, 0);
|
|
} else {
|
|
setfullscreen(selmon->sel, 1);
|
|
}
|
|
}
|