i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit d2ef5a3f27c1c811c503e239388fbf11eaa5e735
parent f745450cb6369fdd044808a3392c435053bc0ca7
Author: Raymond Li <hi@raymond.li>
Date:   Sat, 10 Oct 2020 15:05:11 -0400

Merge pull request #183 from i3/master

Throw error when trying to start on Wayland (#290)
Diffstat:
Mi3lock.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -1510,6 +1510,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:tCeI:frsS:kB:m";
     char *arg = NULL;