mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-03 20:10:23 -04:00
do not allow set client size less than its min size
This commit is contained in:
parent
467123dc99
commit
475c134144
2 changed files with 24 additions and 2 deletions
6
dwl.c
6
dwl.c
|
@ -1636,11 +1636,13 @@ rendermon(struct wl_listener *listener, void *data)
|
|||
void
|
||||
resize(Client *c, int x, int y, int w, int h, int interact)
|
||||
{
|
||||
int min_width = 0, min_height = 0;
|
||||
struct wlr_box *bbox = interact ? &sgeom : &c->mon->w;
|
||||
client_min_size(c, &min_width, &min_height);
|
||||
c->geom.x = x;
|
||||
c->geom.y = y;
|
||||
c->geom.width = w;
|
||||
c->geom.height = h;
|
||||
c->geom.width = MAX(min_width + 2 * c->bw, w);
|
||||
c->geom.height = MAX(min_height + 2 * c->bw, h);
|
||||
applybounds(c, bbox);
|
||||
|
||||
/* Update scene-graph, including borders */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue