Closed heuer closed 6 months ago
XdgTopLevel.parent() checks if the _ptr.parent is None which is never the case and returns a new XdgTopLevel instance with a pointer to NULL:
XdgTopLevel.parent()
_ptr.parent
None
NULL
def parent(self) -> XdgTopLevel | None: """The parent of this toplevel""" parent_ptr = self._ptr.parent if parent_ptr is None: return None return XdgTopLevel(parent_ptr)
Solution: Check against ffi.NULL and return None
ffi.NULL
XdgTopLevel.parent()
checks if the_ptr.parent
isNone
which is never the case and returns a new XdgTopLevel instance with a pointer toNULL
:Solution: Check against
ffi.NULL
and returnNone