diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-29 11:26:04 +0530 | 
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-29 11:26:04 +0530 | 
| commit | 07e4c047eb7cddf10a3a3ef0f396a6b7db658f1c (patch) | |
| tree | 89392f2c25025295ee51e324e5d01724b1f83412 /dwl.c | |
| parent | 15b3df3ba1f946c506081c9dd8bf92c754e09c48 (diff) | |
(patch): alwayscenter.patch
Diffstat (limited to 'dwl.c')
| -rw-r--r-- | dwl.c | 8 | 
1 files changed, 8 insertions, 0 deletions
| @@ -474,6 +474,10 @@ applyrules(Client *c)  			}  		}  	} +	if (mon) { +		c->geom.x = (mon->w.width - c->geom.width) / 2 + mon->m.x; +		c->geom.y = (mon->w.height - c->geom.height) / 2 + mon->m.y; +	}  	setmon(c, mon, newtags);  } @@ -1731,6 +1735,10 @@ mapnotify(struct wl_listener *listener, void *data)  	 * try to apply rules for them */  	if ((p = client_get_parent(c))) {  		c->isfloating = 1; +		if (p->mon) { +			c->geom.x = (p->mon->w.width - c->geom.width) / 2 + p->mon->m.x; +			c->geom.y = (p->mon->w.height - c->geom.height) / 2 + p->mon->m.y; +		}  		setmon(c, p->mon, p->tags);  	} else {  		applyrules(c); | 
