client: make sure the monitor index defaults to -1

This ensures that the menu spawns on the current monitor by default when
using X11 or on all monitors when using Wayland.
This commit is contained in:
Sören Tempel 2021-04-25 02:24:23 +02:00 committed by Jari Vetoniemi
parent 2e922503e8
commit 934aa6fbb9

View File

@ -278,6 +278,9 @@ do_getopt(struct client *client, int *argc, char **argv[])
* Either break the interface and make them --sf, --sb (like they are now),
* or parse them before running getopt.. */
/* Set default monitor index to -1 (maybe be overwritten with -m below). */
client->monitor = -1;
for (optind = 0;;) {
int32_t opt;