From 76e0cff378b038561b8be49a849fb2e30657059e Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Tue, 11 Nov 2025 12:49:28 +0000 Subject: [PATCH] gravity git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@666 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/backend/x11.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/x11.c b/src/backend/x11.c index eb8bab9..c6f1ef2 100644 --- a/src/backend/x11.c +++ b/src/backend/x11.c @@ -128,6 +128,7 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) { unsigned long n = 1; int i; int px = x, py = y; + XSizeHints sh; r = malloc(sizeof(*r)); @@ -147,7 +148,10 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) { p = parent->window; r->top = 0; } - r->window = XCreateSimpleWindow(r->display, p, px, py, width, height, 0, 0, WhitePixel(r->display, DefaultScreen(r->display))); + r->window = XCreateSimpleWindow(r->display, p, px, py, width, height, 0, 0, WhitePixel(r->display, DefaultScreen(r->display))); + sh.flags = PWinGravity; + sh.win_gravity = StaticGravity; + XSetWMNormalHints(r->display, r->window, &sh); xvi = get_visual_info(r->display);