mirror of
https://github.com/Raymo111/i3lock-color.git
synced 2025-02-17 15:55:52 -05:00
Throw error when trying to start on Wayland (#290)
This commit is contained in:
parent
9f675b8a85
commit
ed7185dca8
1 changed files with 2 additions and 0 deletions
2
i3lock.c
2
i3lock.c
|
@ -1038,6 +1038,8 @@ int main(int argc, char *argv[]) {
|
|||
err(EXIT_FAILURE, "getpwuid() failed");
|
||||
if ((username = pw->pw_name) == NULL)
|
||||
errx(EXIT_FAILURE, "pw->pw_name is NULL.");
|
||||
if (getenv("WAYLAND_DISPLAY") != NULL)
|
||||
errx(EXIT_FAILURE, "i3lock is a program for X11 and does not work on Wayland. Try https://github.com/swaywm/swaylock instead");
|
||||
|
||||
char *optstring = "hvnbdc:p:ui:teI:f";
|
||||
while ((o = getopt_long(argc, argv, optstring, longopts, &longoptind)) != -1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue