Fix noborders when sending client to empty monitor
This commit is contained in:
parent
857ab9379f
commit
d6a5f8ab4d
6
dwm.c
6
dwm.c
@ -1345,11 +1345,11 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
||||
c->oldh = c->h; c->h = wc.height = h;
|
||||
wc.border_width = c->bw;
|
||||
|
||||
for (n = 0, nbc = nexttiled(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++);
|
||||
for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++);
|
||||
|
||||
if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
|
||||
if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
|
||||
} else {
|
||||
if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) {
|
||||
if (c->mon->lt[c->mon->sellt]->arrange == monocle || n == 1) {
|
||||
wc.border_width = 0;
|
||||
c->w = wc.width += c->bw * 2;
|
||||
c->h = wc.height += c->bw * 2;
|
||||
|
23
patches/debug-print.snip.c
Normal file
23
patches/debug-print.snip.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void debug_print(char *str)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
char *t_str = ctime(&t);
|
||||
FILE *fp;
|
||||
fp = fopen("/home/michael/dwm-debug.txt", "a");
|
||||
fprintf(fp, "%s: %s", t_str, str);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void resize() {
|
||||
char s[2048];
|
||||
sprintf(s, "resize client. name: %s, mon: %p, selmon: %p\n\tx: %d, y: %d, w: %d, h: %d\n\tn: %d, flt: %d, arrange: %p\n\tismonocle: %d\n",
|
||||
c->name, c->mon, selmon,
|
||||
x, y, w, h,
|
||||
n, c->isfloating, c->mon->lt[c->mon->sellt]->arrange,
|
||||
c->mon->lt[c->mon->sellt]->arrange == monocle
|
||||
);
|
||||
debug_print(s);
|
||||
}
|
Loading…
Reference in New Issue
Block a user