Issue: https://gitlab.gnome.org/World/Phosh/phosh/-/issues/1010
Taken from: https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1333