diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -365,12 +365,12 @@ static cairo_surface_t *select_image(struct swaylock_state *state, } static void load_image(char *arg, struct swaylock_state *state) { - // [<output>:]<path> + // [[<output>]:]<path> struct swaylock_image *image = calloc(1, sizeof(struct swaylock_image)); char *separator = strchr(arg, ':'); if (separator) { *separator = '\0'; - image->output_name = strdup(arg); + image->output_name = separator == arg ? NULL : strdup(arg); image->path = strdup(separator + 1); } else { image->output_name = NULL; @@ -555,7 +555,7 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, "Detach from the controlling terminal after locking.\n" " -h, --help " "Show help message and quit.\n" - " -i, --image [<output>:]<path> " + " -i, --image [[<output>]:]<path> " "Display the given image.\n" " -L, --disable-caps-lock-text " "Disable the Caps Lock text.\n" |
