fix: fix last_open_surface command not match mmsg

This commit is contained in:
DreamMaoMao 2026-05-25 23:29:55 +08:00
parent 72a9f71c51
commit dd40c59535

View file

@ -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");