mirror of
https://codeberg.org/vyivel/dulcepan/
synced 2025-03-12 18:59:15 +02:00
Add a "show cursors" option
This commit is contained in:
parent
254e138a4e
commit
9c7520bef4
@ -138,6 +138,8 @@ struct dp_state {
|
|||||||
const char *output_path; // May be NULL
|
const char *output_path; // May be NULL
|
||||||
enum dp_file_format output_format;
|
enum dp_file_format output_format;
|
||||||
|
|
||||||
|
bool show_cursors;
|
||||||
|
|
||||||
pixman_image_t *unselected_fill_image;
|
pixman_image_t *unselected_fill_image;
|
||||||
pixman_image_t *selected_fill_image;
|
pixman_image_t *selected_fill_image;
|
||||||
pixman_image_t *border_fill_image;
|
pixman_image_t *border_fill_image;
|
||||||
|
@ -152,6 +152,7 @@ static void help(const char *prog) {
|
|||||||
"Usage: %s [options]\n"
|
"Usage: %s [options]\n"
|
||||||
"\n"
|
"\n"
|
||||||
" -h Show this help message and quit.\n"
|
" -h Show this help message and quit.\n"
|
||||||
|
" -C Show cursors in the screenshot.\n"
|
||||||
" -c <path> Specify the configuration file path.\n"
|
" -c <path> Specify the configuration file path.\n"
|
||||||
" -f <format> Specify the output file format.\n"
|
" -f <format> Specify the output file format.\n"
|
||||||
" -o <path> Specify the output file path.\n"
|
" -o <path> Specify the output file path.\n"
|
||||||
@ -171,11 +172,14 @@ int main(int argc, char **argv) {
|
|||||||
const char *config_path = NULL;
|
const char *config_path = NULL;
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
while ((opt = getopt(argc, argv, "hc:f:o:")) != -1) {
|
while ((opt = getopt(argc, argv, "hCc:f:o:")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help(argv[0]);
|
help(argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
|
case 'C':
|
||||||
|
state.show_cursors = true;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
config_path = optarg;
|
config_path = optarg;
|
||||||
break;
|
break;
|
||||||
|
@ -168,12 +168,12 @@ static void output_handle_done(void *data, struct wl_output *wl_output) {
|
|||||||
|
|
||||||
output->has_geom = true;
|
output->has_geom = true;
|
||||||
|
|
||||||
output->frame = zwlr_screencopy_manager_v1_capture_output(
|
|
||||||
output->state->screencopy_manager, false, output->wl_output);
|
|
||||||
zwlr_screencopy_frame_v1_add_listener(output->frame, &frame_listener, output);
|
|
||||||
|
|
||||||
struct dp_state *state = output->state;
|
struct dp_state *state = output->state;
|
||||||
|
|
||||||
|
output->frame = zwlr_screencopy_manager_v1_capture_output(
|
||||||
|
state->screencopy_manager, state->show_cursors, output->wl_output);
|
||||||
|
zwlr_screencopy_frame_v1_add_listener(output->frame, &frame_listener, output);
|
||||||
|
|
||||||
output->main_surface = wl_compositor_create_surface(state->compositor);
|
output->main_surface = wl_compositor_create_surface(state->compositor);
|
||||||
output->main_layer_surface = zwlr_layer_shell_v1_get_layer_surface(state->layer_shell,
|
output->main_layer_surface = zwlr_layer_shell_v1_get_layer_surface(state->layer_shell,
|
||||||
output->main_surface, output->wl_output, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "dulcepan");
|
output->main_surface, output->wl_output, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "dulcepan");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user