Skip to content

Commit c0358bc

Browse files
committed
fix animation resizing bug
1 parent 1af8320 commit c0358bc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"string": "c",
2020
"vector": "c",
2121
"valarray": "c",
22-
"typeinfo": "cpp"
22+
"typeinfo": "cpp",
23+
"*.rh": "cpp"
2324
}
2425
}

instantwm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,13 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, int resetp
517517
int width, height;
518518
width = w ? w : c->w;
519519
height = h ? h : c->h;
520+
521+
if (width > selmon->mw - (2 * c->bw))
522+
width = selmon->ww - (2 * c->bw);
523+
524+
if (height > selmon->wh - (2 * c->bw))
525+
height = selmon->wh - (2 * c->bw);
526+
520527
time = 1;
521528
oldx = c->x;
522529
oldy = c->y;

0 commit comments

Comments
 (0)