perf: 避免不必要的栈顶窗口重排
在 client_stack_raise 中如果 client 已经在窗口栈顶部直接返回,避免不必 要的窗口栈重排
This commit is contained in:
@@ -636,6 +636,8 @@ void client_focus(client_t *client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void client_stack_raise(client_t *client) {
|
void client_stack_raise(client_t *client) {
|
||||||
|
if (wm.client_stack_list == client) return;
|
||||||
|
|
||||||
client_detach_stack(client);
|
client_detach_stack(client);
|
||||||
client_attach_stack(client);
|
client_attach_stack(client);
|
||||||
wm_restack_clients();
|
wm_restack_clients();
|
||||||
|
|||||||
Reference in New Issue
Block a user