diff --git a/server.c b/server.c index f84b689..4bbe03a 100644 --- a/server.c +++ b/server.c @@ -228,57 +228,57 @@ static void rfb_ptr_hook(int mask, int screen_x, int screen_y, rfbClientPtr cl) int touch_x = round(global_x / resolution.x * UINPUT_ABS_MAX); int touch_y = round(global_y / resolution.y * UINPUT_ABS_MAX); struct input_event ies1[] = { - { - .type = EV_ABS, - .code = ABS_X, - .value = touch_x, - }, - { - .type = EV_ABS, - .code = ABS_Y, - .value = touch_y, - }, - { - .type = EV_KEY, - .code = BTN_LEFT, - .value = !! (mask & 0b1) - }, - { - .type = EV_KEY, - .code = BTN_MIDDLE, - .value = !! (mask & 0b10) - }, - { - .type = EV_KEY, - .code = BTN_RIGHT, - .value = !! (mask & 0b100) - }, - { - .type = EV_SYN, - .code = SYN_REPORT, - .value = 0, - }, + { + .type = EV_ABS, + .code = ABS_X, + .value = touch_x, + }, + { + .type = EV_ABS, + .code = ABS_Y, + .value = touch_y, + }, + { + .type = EV_KEY, + .code = BTN_LEFT, + .value = !! (mask & 0b1) + }, + { + .type = EV_KEY, + .code = BTN_MIDDLE, + .value = !! (mask & 0b10) + }, + { + .type = EV_KEY, + .code = BTN_RIGHT, + .value = !! (mask & 0b100) + }, + { + .type = EV_SYN, + .code = SYN_REPORT, + .value = 0, + }, }; for (int i = 0; i < ARRAY_SIZE(ies1); i++) { write(uinput_fd, &ies1[i], sizeof(ies1[0])); } if (mask & 0b11000) { struct input_event ies2[] = { - { - .type = EV_REL, - .code = REL_WHEEL, - .value = mask & 0b1000 ? 1 : -1, - }, - { - .type = EV_SYN, - .code = SYN_REPORT, - .value = 0, - }, + { + .type = EV_REL, + .code = REL_WHEEL, + .value = mask & 0b1000 ? 1 : -1, + }, + { + .type = EV_SYN, + .code = SYN_REPORT, + .value = 0, + }, }; for (int i = 0; i < ARRAY_SIZE(ies2); i++) { write(uinput_fd, &ies2[i], sizeof(ies2[0])); } - } + } }