aboutsummaryrefslogtreecommitdiff
path: root/patches/alwayscenter.patch
blob: 36647639d88c251b0af459d2a0ba6d2846f4afac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 95ac2fd73af8cee3ce3e556c254e60a2ca985515 Mon Sep 17 00:00:00 2001
From: Guido Cella <guido@guidocella.xyz>
Date: Tue, 16 Jan 2024 18:14:50 +0100
Subject: [PATCH] center floating windows

---
 dwl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dwl.c b/dwl.c
index 95ebee8..ac077e3 100644
--- a/dwl.c
+++ b/dwl.c
@@ -453,6 +453,8 @@ applyrules(Client *c)
 			}
 		}
 	}
+	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);
 }
 
-- 
2.43.0