Addresses #324 (closed).
This was tested on Linux >= 6.0 on Arch Linux (with Wayland, if that matters).