Translate all Chinese comments to English in source files

- Translate comments in src/client/client.h
- Translate comments in src/config/parse_config.h
- Translate comments in src/data/static_keymap.h
- Translate comments in src/dispatch/bind_define.h
- Translate comments in src/ext-protocol/*.h
- Translate comments in src/fetch/*.h
- Translate comments in src/layout/*.h
- Translate comments in src/mango.c

All Chinese comments have been accurately translated to English
while preserving the technical meaning and context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-18 09:50:35 +00:00
parent 288710ad9e
commit 2c181fcb21
16 changed files with 396 additions and 396 deletions

View file

@ -99,30 +99,30 @@ bool custom_wlr_scene_output_commit(struct wlr_scene_output *scene_output,
struct wlr_output *wlr_output = scene_output->output;
Monitor *m = wlr_output->data;
// 检查是否需要帧
// Check if frame is needed
if (!wlr_scene_output_needs_frame(scene_output)) {
wlr_log(WLR_DEBUG, "No frame needed for output %s", wlr_output->name);
return true;
}
// 构建输出状态
// Build output state
if (!wlr_scene_output_build_state(scene_output, state, NULL)) {
wlr_log(WLR_ERROR, "Failed to build output state for %s",
wlr_output->name);
return false;
}
// 测试撕裂翻页
// Test tearing page flip
if (state->tearing_page_flip) {
if (!wlr_output_test_state(wlr_output, state)) {
state->tearing_page_flip = false;
}
}
// 尝试提交
// Attempt commit
bool committed = wlr_output_commit_state(wlr_output, state);
// 如果启用撕裂翻页但提交失败,重试禁用撕裂翻页
// If tearing page flip is enabled but commit fails, retry without tearing page flip
if (!committed && state->tearing_page_flip) {
wlr_log(WLR_DEBUG, "Retrying commit without tearing for %s",
wlr_output->name);
@ -130,7 +130,7 @@ bool custom_wlr_scene_output_commit(struct wlr_scene_output *scene_output,
committed = wlr_output_commit_state(wlr_output, state);
}
// 处理状态清理
// Handle state cleanup
if (committed) {
wlr_log(WLR_DEBUG, "Successfully committed output %s",
wlr_output->name);
@ -140,7 +140,7 @@ bool custom_wlr_scene_output_commit(struct wlr_scene_output *scene_output,
}
} else {
wlr_log(WLR_ERROR, "Failed to commit output %s", wlr_output->name);
// 即使提交失败,也清理状态避免积累
// Clean up state even if commit fails to avoid accumulation
if (state == &m->pending) {
wlr_output_state_finish(&m->pending);
wlr_output_state_init(&m->pending);