aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrdotx <klassiker@gmx.de>2022-05-15 18:52:08 +0200
committermrdotx <klassiker@gmx.de>2022-05-15 18:52:08 +0200
commitf8cb897389ce6587f9dd2309e728d6ef5d2e80f3 (patch)
tree061a9991c0a45ca2873a2c3e1f753a12aede11ce
parent854de3fa4e5d72b6d27435e997514588366f7217 (diff)
border width fixed
-rw-r--r--pinentry-dmenu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c
index ec240d2..e08c823 100644
--- a/pinentry-dmenu.c
+++ b/pinentry-dmenu.c
@@ -396,8 +396,8 @@ setup(void) {
if (center) {
mw = MIN(centerwidth, info[i].width) - (borderwidth * 2);
mh = (mh * 2) - (borderwidth * 2);
- x = info[i].x_org + ((info[i].width - mw) / 2);
- y = info[i].y_org + ((info[i].height - mh) / 2);
+ x = info[i].x_org + ((info[i].width - mw) / 2) - borderwidth;
+ y = info[i].y_org + ((info[i].height - mh) / 2) - borderwidth;
} else {
x = info[i].x_org;
y = info[i].y_org + (bottom ? info[i].height - mh : 0);
@@ -415,8 +415,8 @@ setup(void) {
if (center) {
mw = MIN(centerwidth, wa.width) - (borderwidth * 2);
mh = (mh * 2) - (borderwidth * 2);
- x = (wa.width - mw) / 2;
- y = (wa.height - mh) / 2;
+ x = ((wa.width - mw) / 2) - borderwidth;
+ y = ((wa.height - mh) / 2) - borderwidth;
} else {
x = 0;
y = bottom ? wa.height - mh : 0;