Skip to content

Commit

Permalink
Throw error when trying to start on Wayland (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
v0idpwn authored Oct 2, 2020
1 parent 9f675b8 commit ed7185d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions i3lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ed7185d

Please sign in to comment.