diff --git a/src/main.c b/src/main.c index 06ce7aa..512e0ce 100644 --- a/src/main.c +++ b/src/main.c @@ -575,6 +575,7 @@ int wayvnc_usage(FILE* stream, int rc) " -o,--output= Select output to capture.\n" " -k,--keyboard= Select keyboard layout.\n" " -s,--seat= Select seat by name.\n" +" -r,--render-cursor Enable overlay cursor rendering.\n" " -h,--help Get help (this text).\n" "\n"; @@ -631,8 +632,10 @@ int main(int argc, char* argv[]) const char* output_name = NULL; enum frame_capture_backend_type fcbackend = FRAME_CAPTURE_BACKEND_NONE; const char* seat_name = NULL; + + bool overlay_cursor = false; - static const char* shortopts = "C:c:o:k:s:h"; + static const char* shortopts = "C:c:o:k:s:rh"; static const struct option longopts[] = { { "config", required_argument, NULL, 'C' }, @@ -640,6 +643,7 @@ int main(int argc, char* argv[]) { "output", required_argument, NULL, 'o' }, { "keyboard", required_argument, NULL, 'k' }, { "seat", required_argument, NULL, 's' }, + { "render-cursor", no_argument, NULL, 'r' }, { "help", no_argument, NULL, 'h' }, { NULL, 0, NULL, 0 } }; @@ -671,6 +675,9 @@ int main(int argc, char* argv[]) case 's': seat_name = optarg; break; + case 'r': + overlay_cursor = true; + break; case 'h': return wayvnc_usage(stdout, 0); default: @@ -810,6 +817,8 @@ int main(int argc, char* argv[]) break; } + self.capture_backend->overlay_cursor = overlay_cursor; + if (wayvnc_start_capture(&self) < 0) goto capture_failure;