perf: 避免不必要的栈顶窗口重排

在 client_stack_raise 中如果 client 已经在窗口栈顶部直接返回,避免不必
要的窗口栈重排
This commit is contained in:
2026-03-03 00:27:23 +08:00
parent ab3d441928
commit 9b7c3a67ef

View File

@@ -636,6 +636,8 @@ void client_focus(client_t *client) {
}
void client_stack_raise(client_t *client) {
if (wm.client_stack_list == client) return;
client_detach_stack(client);
client_attach_stack(client);
wm_restack_clients();