Regression: Wnck.Screen.get_default() segfaults under Wayland
With version 3.36.0 (that is, package gir1.2-wnck-3.0 version 3.36.0-1 from Debian bullseye), the following command ran in a Wayland session:
python3 -c 'from gi.repository import Wnck; print(Wnck.Screen.get_default())'
results in the following output:
<string>:1: PyGIWarning: Wnck was imported without specifying a version first. Use gi.require_version('Wnck', '3.0') before import to ensure that the right version gets loaded.
(-c:9238): Wnck-WARNING **: 01:41:46.772: libwnck is designed to work in X11 only, no valid display found
None
Instead, with version 43.0 (that is, package version 43.0-3 from current Debian testing), the same command segfaults:
<string>:1: PyGIWarning: Wnck was imported without specifying a version first. Use gi.require_version('Wnck', '3.0') before import to ensure that the right version gets loaded.
(-c:13684): Wnck-WARNING **: 01:48:05.272: libwnck is designed to work in X11 only, no valid display found
Segmentation fault (core dumped)
I understand that behavior under Wayland is most likely not one of the main concerns for this library, but I'm reporting this because 1) it's a regression 2) Python libraries are not expected to segfault, and 3) there is software out there that expects this not to segfault - I found this in the kupfer launcher.