commit e5f8bd5655fbf0c4042d2b94bb938896dfa12965
parent 9df7e79cbcf52c9624ef3b4b135d94f815eed3a8
Author: Martin Pittermann <martinp2250@gmail.com>
Date: Tue, 10 Mar 2020 21:29:27 +0100
Merge remote-tracking branch 'upstream/master'
Diffstat:
14 files changed, 223 insertions(+), 163 deletions(-)
diff --git a/.github/workflows/Build Test.yml b/.github/workflows/Build Test.yml
@@ -0,0 +1,27 @@
+name: Build Test
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install dependencies
+ run: sudo apt install pkg-config libpam0g-dev libcairo2-dev libfontconfig1-dev libxcb-composite0-dev libev-dev libx11-xcb-dev libxcb-xkb-dev libxcb-xinerama0-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev libjpeg-dev
+ - name: autoreconf
+ run: autoreconf -fiv
+ - name: configure
+ run: ./configure --prefix=/usr --sysconfdir=/etc
+ - name: make
+ run: make
+ - name: make check
+ run: make check
+ - name: make distcheck
+ run: make distcheck
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,11 @@
+2019-07-21 i3lock 2.12
+
+ • remove stray \n from error messages
+ • capitalize unlock indicator contents
+ • set WM_CLASS property
+ • reference modifier as “Super”, not “Win”
+ • add --raw option to read image as raw bytes
+
2018-10-18 i3lock 2.11.1
• Fix dist tarball by including I3LOCK_VERSION
diff --git a/I3LOCK_VERSION b/I3LOCK_VERSION
@@ -1 +1 @@
-2.12.c-non-git
+2.12.c.1-non-git
diff --git a/LICENSE b/LICENSE
@@ -1,5 +1,6 @@
Copyright © 2010-2011, Michael Stapelberg
Copyright © 2015, Cassandra Fox
+Copyright © 2015, Raymond Li
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -12,15 +13,17 @@ modification, are permitted provided that the following conditions are met:
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- * Neither the name of Michael Stapelberg nor the
- names of contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ * Neither the name of Michael Stapelberg, nor the name of Raymond Li,
+ nor the names of contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
-THIS SOFTWARE IS PROVIDED BY Michael Stapelberg/Cassandra Fox ''AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL Michael Stapelberg/Cassandra Fox BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+THIS SOFTWARE IS PROVIDED BY Michael Stapelberg/Cassandra Fox/Raymond Li
+''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL Michael Stapelberg/Cassandra Fox/Raymond Li BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
diff --git a/Makefile.am b/Makefile.am
@@ -7,6 +7,8 @@ bin_PROGRAMS = i3lock
dist_man1_MANS = i3lock.1
+DISTCLEANFILES = i3lock-color-*.tar.bz2
+
pamddir = $(sysconfdir)/pam.d
pamd_files = pam/i3lock
pamd_DATA = $(pamd_files)
@@ -42,26 +44,26 @@ i3lock_LDADD = \
$(CODE_COVERAGE_LDFLAGS)
i3lock_SOURCES = \
+ blur.c \
+ blur.h \
+ blur_simd.c \
cursors.h \
dpi.c \
dpi.h \
+ fonts.h \
+ jpg.c \
+ jpg.h \
i3lock.c \
i3lock.h \
randr.c \
randr.h \
+ rgba.h \
+ tinyexpr.c \
+ tinyexpr.h \
unlock_indicator.c \
unlock_indicator.h \
xcb.c \
- xcb.h \
- tinyexpr.c \
- tinyexpr.h \
- blur_simd.c \
- blur.c \
- blur.h \
- jpg.c \
- jpg.h \
- fonts.h
-
+ xcb.h
EXTRA_DIST = \
$(pamd_files) \
diff --git a/README.md b/README.md
@@ -1,127 +1,112 @@
-i3lock - improved screen locker
-===============================
-
-_This is just a re-patched version of i3lock with the commits from [i3lock-color](https://github.com/eBrnd/i3lock-color); all the credit for the color functionality goes to [eBrnd](https://github.com/eBrnd/) !_
-
-
-
-i3lock is a simple screen locker like slock. After starting it, you will
-see a white screen (you can configure the color/an image). You can return
-to your screen by entering your password.
+# i3lock - improved screen locker
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**A re-patched version of i3lock with color functionality by [eBrnd](https://github.com/eBrnd/i3lock-color), started by Chris Guillott and [PandorasFox](https://github.com/PandorasFox/), and now maintained and being developed by [Raymo111](https://github.com/Raymo111)**
+
+
+
+i3lock is a simple screen locker like slock. After starting it, you will see a white screen (you can configure the color/an image). You can return to your screen by entering your password.
Many little improvements have been made to i3lock over time:
-- i3lock forks, so you can combine it with an alias to suspend to RAM
- (run "i3lock && echo mem > /sys/power/state" to get a locked screen
- after waking up your computer from suspend to RAM)
-
-- You can specify either a background color or an image (JPG or PNG), which will be
- displayed while your screen is locked.
-
+- i3lock forks, so you can combine it with an alias to suspend to RAM (run "i3lock && echo mem > /sys/power/state" to get a locked screen after waking up your computer from suspend to RAM)
+- You can specify either a background color or an image (JPG or PNG), which will be displayed while your screen is locked. Note that i3lock is not an image manipulation software. If you need to resize the image to fill the screen or similar, use existing tooling to do this before passing it to i3lock. I hope to add this functionality to i3lock-color in the near future.
- You can specify whether i3lock should bell upon a wrong password.
+- i3lock uses PAM and therefore is compatible with LDAP etc. On OpenBSD, i3lock uses the bsd\_auth(3) framework.
+
+## Additional features in i3lock-color
+You can also specify additional options, as detailed in the manpage. This includes, but is not limited to:
+
+- Color options for:
+ - Verification ring
+ - Interior ring color
+ - Ring interior line color
+ - Key highlight color
+ - Backspace highlight color
+ - Text colors for most/all strings
+ - Changing all of the above depending on PAM's authentication status
+- Blurring the current screen and using that as the lock background
+- Showing a clock in the indicator
+- Refreshing on a timer, instead of on each keypress
+- Positioning the various UI elements
+- Changing the ring radius and thickness, as well as text size
+- Passthrough media keys
+- A new bar indicator, which replaces the ring indicator with its own set of options
+ - An experimental thread for driving the redraw ticks, so that things like the bar/clock still update when PAM is blocking
+
+## Dependencies
+The following dependencies will need to be installed for a successful build, depending on your OS/distro.
+
+### Ubuntu 18.04 LTS
+Run this command to install all dependencies:
+```
+sudo apt install pkg-config libpam0g-dev libcairo2-dev libfontconfig1-dev libxcb-composite0-dev libev-dev libx11-xcb-dev libxcb-xkb-dev libxcb-xinerama0-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev libjpeg-dev
+```
-- i3lock uses PAM and therefore is compatible with LDAP etc.
- On OpenBSD i3lock uses the bsd\_auth(3) framework.
-
-## Additional features in this fork
-
-You can also specify additional options, as detailed in the manpage. This includes, but is not limited to, the following:
-
- - Color options for the following:
- - verification ring
- - interior ring color
- - ring interior line color
- - key highlight color
- - backspace highlight color
- - text colors for most/all strings
- - Changing all of the above depending on PAM's authentication status
- - Blurring the current screen and using that as the lock background
- - Showing a clock in the indicator
- - refreshing on a timer, instead of on each keypress
- - Positioning the various UI elements
- - Changing the ring radius and thickness, as well as text size
- - Passthrough media keys
- - A new bar indicator, which replaces the ring indicator with its own set of options
- - An experimental thread for driving the redraw ticks, so that things like the bar/clock still update when PAM is blocking
-
-# Building
-
-Before you build - check and see if there's a packaged version available for your distro (there usually is, either in a community repo/PPA).
-
-If there's no packaged version available - think carefully, since you're using a forked screen locker at your own risk.
-
-**If you want to build a non-debug version, you should tag your build before configuring.** For example: `git tag -f "git-$(git rev-parse --short HEAD)"` will add a tag with the short commit ID, which will be used for the version info. Issues asking about ASAN/complaints about i3lock-color being slow / etc will likely be closed.
-
-i3lock now uses GNU autotools for building; you'll need to do something like `autoreconf -i && ./configure && make` to build.
-
-## Required Packages
-- pkg-config
-- libxcb
-- libxcb-util
-- libpam-dev
-- libcairo-dev
-- libfontconfig-dev
-- libxcb-composite0
-- libxcb-composite0-dev
-- libxcb-xinerama
-- libxcb-randr
-- libev
-- libx11-xcb-dev
-- libxkbcommon >= 0.5.0
-- libxkbcommon-x11 >= 0.5.0
-- libjpeg-turbo >= 1.4.90
-#### Required Packages (Fedora 27)
-- cairo-devel
+## Arch Linux
+- cairo
+- fontconfig
- libev
-- libev-devel
-- libjpeg-devel
- libjpeg-turbo
-- libxcb
-- libxkbcommon
+- libxinerama
- libxkbcommon-x11
-- libxkbcommon-x11-devel
-- pam-devel
-- pkg-config
-- xcb-util-devel
+- libxrandr
+- pam
+- pkgconf
- xcb-util-image
-- xcb-util-image-devel
-
-##### Aur Package
-[Stable](https://aur.archlinux.org/packages/i3lock-color/)
-
-[Git](https://aur.archlinux.org/packages/i3lock-color-git)
+- xcb-util-xrm
-##### FreeBSD port
-[i3lock-color-port](https://github.com/rkashapov/i3lock-color-port/)
-
-Running i3lock
--------------
-Simply invoke the 'i3lock' command. To get out of it, enter your password and
-press enter.
+## Building i3lock-color
+Before you build - check and see if there's a packaged version available for your distro (there usually is, either in a community repo/PPA).
-A [sample script](https://github.com/PandorasFox/i3lock-color/blob/master/lock.sh) is included in this repository. [Here](https://streamable.com/fpl46) is a short clip of that script in action!
+If there's no packaged version available - think carefully, since you're using a forked screen locker at your own risk.
-On OpenBSD the `i3lock` binary needs to be setgid `auth` to call the
-authentication helpers, e.g. `/usr/libexec/auth/login_passwd`.
+**If you want to build a non-debug version, you should tag your build before configuring.** For example: `git tag -f "git-$(git rev-parse --short HEAD)"` will add a tag with the short commit ID, which will be used for the version info. Issues asking about ASAN/complaints about i3lock-color being slow / etc will likely be closed. i3lock-color uses GNU autotools for building.
-Building i3lock
----------------
-First install the dependencies listed in requirements section, then run these
-commands (might need to be adapted to your OS):
+To build i3lock-color, first install the dependencies listed above, then run these commands (which might need to be adapted to your OS/distro):
```
-autoreconf --force --install
+autoreconf -fiv
rm -rf build/
mkdir -p build && cd build/
-../configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --disable-sanitizers
+../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
make
```
-Upstream
---------
-Please submit pull requests for i3lock things to https://github.com/i3/i3lock and pull requests for additional features on top of regular i3lock at https://github.com/PandorasFox/i3lock-color.
+## Arch Linux Packages
+[Stable version in Community](https://www.archlinux.org/packages/community/x86_64/i3lock-color/)
+
+[Git Version on AUR](https://aur.archlinux.org/packages/i3lock-color-git/)
+
+## FreeBSD port
+[i3lock-color-port](https://github.com/rkashapov/i3lock-color-port/)
+
+## Running i3lock-color
+Simply invoke the 'i3lock' command. To get out of it, enter your password and press enter.
+
+A [sample script](lock.sh) is included in this repository. [See the script in action](https://streamable.com/fpl46)
+
+On OpenBSD the `i3lock` binary needs to be setgid `auth` to call the authentication helpers, e.g. `/usr/libexec/auth/login_passwd`.
+
+## Upstream
+Please submit pull requests for i3lock things to https://github.com/i3/i3lock and pull requests for additional features on top of regular i3lock at https://github.com/Raymo111/i3lock-color.
diff --git a/configure.ac b/configure.ac
@@ -2,7 +2,7 @@
# Run autoreconf -fi to generate a configure script from this file.
AC_PREREQ([2.69])
-AC_INIT([i3lock-color], [2.12], [https://github.com/PandorasFox/i3lock-color/issues])
+AC_INIT([i3lock-color], [2.12.c.1], [https://github.com/Raymo11/i3lock-color/issues])
# For AX_EXTEND_SRCDIR
AX_ENABLE_BUILDDIR
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2])
diff --git a/fonts.h b/fonts.h
@@ -5,7 +5,7 @@
#include <cairo-ft.h>
#include <stdbool.h>
-#include "rgba.h"
+#include <rgba.h>
#define VERIF_FONT 0
#define WRONG_FONT 1
diff --git a/i3lock.1 b/i3lock.1
@@ -64,7 +64,7 @@ Enable beeping. Be sure to not do this when you are about to annoy other people,
like when opening your laptop in a boring lecture.
.TP
-.B \-u, \-\-no-unlock-indicator
+.B \-u, \-\-no\-unlock\-indicator
Disable the unlock indicator. i3lock will by default show an unlock indicator
after pressing keys. This will give feedback for every keypress and it will
show you the current PAM state (whether your password is currently being
@@ -121,7 +121,7 @@ displays a hardcoded Windows-Pointer (thus enabling you to mess with your
friends by using a screenshot of a Windows desktop as a locking-screen).
.TP
-.B \-e, \-\-ignore-empty-password
+.B \-e, \-\-ignore\-empty\-password
When an empty password is provided by the user, do not validate
it. Without this option, the empty password will be provided to PAM
and, if invalid, the user will have to wait a few seconds before
@@ -130,7 +130,7 @@ put a laptop to sleep and bounce on resume or if you happen to wake up
your computer with the enter key.
.TP
-.B \-f, \-\-show-failed-attempts
+.B \-f, \-\-show\-failed\-attempts
Show the number of failed attempts, if any.
.TP
@@ -177,17 +177,17 @@ Displays the clock. \-\-force\-clock also displays the clock when there's indica
Some compositors have problems with i3lock trying to render over them, so this argument is disabled by default. However, some will work properly with it, so it's been left enabled.
.TP
-.B \-\-pass-media-keys
+.B \-\-pass\-media\-keys
Allow the following keys to be used while the screen is locked by passing them through:
XF86AudioPlay, XF86AudioPause, XF86AudioStop, XF86AudioPrev, XF86AudioNext, XF86AudioMute, XF86AudioLowerVolume, XF86AudioRaiseVolume.
.TP
-.B \-\-pass-screen-keys
+.B \-\-pass\-screen\-keys
Allow the following keys to be used while the screen is locked by passing them through:
XF86MonBrightnessUp, XF86MonBrightnessDown.
.TP
-.B \-\-pass-power-keys
+.B \-\-pass\-power\-keys
Allow the following keys to be used while the screen is locked by passing them through:
XF86PowerDown, XF86PowerOff, XF86Sleep.
@@ -315,7 +315,7 @@ Sets the color of the date in the clock.
Sets the format used for generating the date string. See strftime(3) for a full list of format specifiers.
.TP
-.B \-\-{time, date, layout, verif, wrong, greeter}\-font=sans-serif
+.B \-\-{time, date, layout, verif, wrong, greeter}\-font=sans\-serif
Sets the font used to render various strings.
.TP
@@ -348,7 +348,7 @@ Sets the color of the greeter text.
Sets the position for the date string. All the variables from \-\-indpos and \-\-timepos may be used.
.TP
-.B \-\-refresh\-rate=seconds-as-double
+.B \-\-refresh\-rate=seconds\-as\-double
The refresh rate of the indicator, given in seconds. This should automatically align itself, but is somewhat buggy currently. Values less than one will work, but may result in poor system performance.
.TP
@@ -450,7 +450,7 @@ use a wrapper script around i3lock like the following:
\& revert
.Ve
-The \-I (-\-inactivity-timeout=seconds) was removed because it only makes sense with DPMS.
+The \-I (\-\-inactivity\-timeout=seconds) was removed because it only makes sense with DPMS.
.SH SEE ALSO
.IR xautolock(1)
@@ -465,3 +465,5 @@ Michael Stapelberg <michael+i3lock at stapelberg dot de>
Jan-Erik Rediger <badboy at archlinux.us>
Pandora <pandora at techfo dot xyz>
+
+Raymond Li <hi at raymond.li>
diff --git a/i3lock.c b/i3lock.c
@@ -120,15 +120,15 @@ int layout_align = 0;
int modif_align = 0;
int greeter_align = 0;
-char time_format[32] = "%H:%M:%S\0";
-char date_format[32] = "%A, %m %Y\0";
+char time_format[64] = "%H:%M:%S\0";
+char date_format[64] = "%A, %m %Y\0";
-char verif_font[32] = "sans-serif\0";
-char wrong_font[32] = "sans-serif\0";
-char layout_font[32] = "sans-serif\0";
-char time_font[32] = "sans-serif\0";
-char date_font[32] = "sans-serif\0";
-char greeter_font[32] = "sans-serif\0";
+char verif_font[64] = "sans-serif\0";
+char wrong_font[64] = "sans-serif\0";
+char layout_font[64] = "sans-serif\0";
+char time_font[64] = "sans-serif\0";
+char date_font[64] = "sans-serif\0";
+char greeter_font[64] = "sans-serif\0";
char* fonts[6] = {
verif_font,
@@ -190,6 +190,7 @@ xcb_window_t win;
static xcb_cursor_t cursor;
#ifndef __OpenBSD__
static pam_handle_t *pam_handle;
+static bool pam_cleanup;
#endif
int input_position = 0;
/* Holds the password you enter (in UTF-8). */
@@ -530,7 +531,7 @@ static void input_done(void) {
* credentials like kerberos /tmp/krb5cc_pam_* files which may of been left behind if the
* refresh of the credentials failed. */
pam_setcred(pam_handle, PAM_REFRESH_CRED);
- pam_end(pam_handle, PAM_SUCCESS);
+ pam_cleanup = true;
ev_break(EV_DEFAULT, EVBREAK_ALL);
return;
@@ -1362,11 +1363,6 @@ int main(int argc, char *argv[]) {
int ret;
struct pam_conv conv = {conv_callback, NULL};
#endif
-#if defined(__linux__)
- bool lock_tty_switching = false;
- int term = -1;
-#endif
-
int curs_choice = CURS_NONE;
int o;
int longoptind = 0;
@@ -1737,40 +1733,40 @@ int main(int argc, char *argv[]) {
// Font stuff
case 520:
- if (strlen(optarg) > 31) {
- errx(1, "time font string can be at most 31 characters\n");
+ if (strlen(optarg) > 63) {
+ errx(1, "time font string can be at most 63 characters\n");
}
strcpy(fonts[TIME_FONT],optarg);
break;
case 521:
- if (strlen(optarg) > 31) {
- errx(1, "date font string can be at most 31 characters\n");
+ if (strlen(optarg) > 63) {
+ errx(1, "date font string can be at most 63 characters\n");
}
strcpy(fonts[DATE_FONT],optarg);
break;
case 522:
- if (strlen(optarg) > 31) {
- errx(1, "verif font string can be at most 31 "
+ if (strlen(optarg) > 63) {
+ errx(1, "verif font string can be at most 63 "
"characters\n");
}
strcpy(fonts[VERIF_FONT],optarg);
break;
case 523:
- if (strlen(optarg) > 31) {
- errx(1, "wrong font string can be at most 31 "
+ if (strlen(optarg) > 63) {
+ errx(1, "wrong font string can be at most 63 "
"characters\n");
}
strcpy(fonts[WRONG_FONT],optarg);
break;
case 524:
- if (strlen(optarg) > 31) {
- errx(1, "layout font string can be at most 31 characters\n");
+ if (strlen(optarg) > 63) {
+ errx(1, "layout font string can be at most 63 characters\n");
}
strcpy(fonts[LAYOUT_FONT],optarg);
break;
case 525:
- if (strlen(optarg) > 31) {
- errx(1, "greeter font string can be at most 31 characters\n");
+ if (strlen(optarg) > 63) {
+ errx(1, "greeter font string can be at most 63 characters\n");
}
strcpy(fonts[GREETER_FONT],optarg);
break;
@@ -2306,6 +2302,12 @@ int main(int argc, char *argv[]) {
}
ev_loop(main_loop, 0);
+#ifndef __OpenBSD__
+ if (pam_cleanup) {
+ pam_end(pam_handle, PAM_SUCCESS);
+ }
+#endif
+
if (stolen_focus == XCB_NONE) {
return 0;
}
diff --git a/screenshot.png b/screenshot.png
Binary files differ.
diff --git a/unlock_indicator.c b/unlock_indicator.c
@@ -303,7 +303,7 @@ static void draw_text(cairo_t *ctx, text_t text) {
break;
case 0:
default:
- x = text.x - ((extents.width / 2) + (extents.x_bearing / 2));
+ x = text.x - extents.x_advance / 2;
break;
}
diff --git a/unlock_indicator.h b/unlock_indicator.h
@@ -4,7 +4,7 @@
#include <ev.h>
#include <xcb/xcb.h>
-#include "fonts.h"
+#include <fonts.h>
typedef enum {
STATE_STARTED = 0, /* default state */
diff --git a/xcb.c b/xcb.c
@@ -37,6 +37,26 @@ extern bool debug_mode;
xcb_connection_t *conn;
xcb_screen_t *screen;
+static xcb_atom_t _NET_WM_BYPASS_COMPOSITOR = XCB_NONE;
+void _init_net_wm_bypass_compositor(xcb_connection_t *conn) {
+ if (_NET_WM_BYPASS_COMPOSITOR != XCB_NONE) {
+ /* already initialized */
+ return;
+ }
+ xcb_generic_error_t *err;
+ xcb_intern_atom_reply_t *atom_reply = xcb_intern_atom_reply(
+ conn,
+ xcb_intern_atom(conn, 0, strlen("_NET_WM_BYPASS_COMPOSITOR"), "_NET_WM_BYPASS_COMPOSITOR"),
+ &err);
+ if (atom_reply == NULL) {
+ fprintf(stderr, "X11 Error %d\n", err->error_code);
+ free(err);
+ return;
+ }
+ _NET_WM_BYPASS_COMPOSITOR = atom_reply->atom;
+ free(atom_reply);
+}
+
#define curs_invisible_width 8
#define curs_invisible_height 8
@@ -191,6 +211,17 @@ xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, c
2 * (strlen("i3lock") + 1),
"i3lock\0i3lock\0");
+ const uint32_t bypass_compositor = 1; /* disable compositing */
+ _init_net_wm_bypass_compositor(conn);
+ xcb_change_property(conn,
+ XCB_PROP_MODE_REPLACE,
+ win,
+ _NET_WM_BYPASS_COMPOSITOR,
+ XCB_ATOM_CARDINAL,
+ 32,
+ 1,
+ &bypass_compositor);
+
/* Map the window (= make it visible) */
xcb_map_window(conn, win);