From 663d78714700f7d49d7559299453ffae14c21e77 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 11 Dec 2018 10:26:53 -0500 Subject: [PATCH] fixed bug in centering logic. --- inc/x11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/x11.h b/inc/x11.h index bb4cb65..80793bc 100644 --- a/inc/x11.h +++ b/inc/x11.h @@ -84,8 +84,8 @@ static void x11_centerwin(XConf* x) { maxy = p_screens[i].y_org + p_screens[i].height; if (minx <= ptrx && ptrx <= maxx && miny <= ptry && ptry <= maxy) { XMoveWindow(x->display, x->self, - p_screens[i].width/2 - x->width/2, - p_screens[i].height/2 - x->height/2); + minx + p_screens[i].width/2 - x->width/2, + miny + p_screens[i].height/2 - x->height/2); break; } } -- 2.52.0