opt: want focus x11 client still center pos

This commit is contained in:
DreamMaoMao 2025-05-13 09:41:30 +08:00
parent a19aa3d471
commit 1dbc5fe2ed

View file

@ -5299,7 +5299,7 @@ setfloating(Client *c, int floating) {
target_box.width = target_box.width * 0.8;
}
// 重新计算居中的坐标
if(!client_is_x11(c))
if(client_is_x11(c) && client_surface_wants_focus(c))
target_box = setclient_coordinate_center(target_box, 0, 0);
backup_box = c->geom;
hit = applyrulesgeom(c);