From dd40c595352a8f7c2cf48c083cafc2b3743fcdb7 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 25 May 2026 23:29:55 +0800 Subject: [PATCH] fix: fix last_open_surface command not match mmsg --- src/ipc/ipc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipc/ipc.h b/src/ipc/ipc.h index d6fbea6f..3794f7fa 100644 --- a/src/ipc/ipc.h +++ b/src/ipc/ipc.h @@ -252,8 +252,8 @@ static void handle_command(int client_fd, const char *cmd_raw) { } else if (strcmp(cmd, "get keyboardlayout") == 0) { resp = cJSON_CreateObject(); cJSON_AddStringToObject(resp, "layout", ipc_get_layout_str()); - } else if (strncmp(cmd, "get last_open_surface ", 25) == 0) { - const char *name = cmd + 25; + } else if (strncmp(cmd, "get last_open_surface ", 22) == 0) { + const char *name = cmd + 22; Monitor *m = monitor_by_name(name); if (!m) { send_static_json(client_fd, "{\"error\":\"monitor not found\"}\n");