From 9343874a22b0fe2e97d039fc50ea14ed1b37ed1e Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 12 Feb 2026 18:12:01 +0800 Subject: [PATCH] opt: make x11 floating window coordinate auto ajust the monitor change --- src/mango.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mango.c b/src/mango.c index 9c51523..25ab3a9 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1383,6 +1383,14 @@ void applyrules(Client *c) { Monitor *mon = parent && parent->mon ? parent->mon : selmon; c->isfloating = client_is_float_type(c) || parent; + +#ifdef XWAYLAND + if (c->isfloating && client_is_x11(c)) { + fix_xwayland_unmanaged_coordinate(&c->geom); + c->float_geom = c->geom; + } +#endif + if (!(appid = client_get_appid(c))) appid = broken; if (!(title = client_get_title(c)))