diff --git a/src/ewmhlib/_ewmhlib.py b/src/ewmhlib/_ewmhlib.py index 0270ab4..e729c23 100644 --- a/src/ewmhlib/_ewmhlib.py +++ b/src/ewmhlib/_ewmhlib.py @@ -1102,6 +1102,10 @@ def getName(self) -> Optional[str]: return str(res[0]) ret = self.getProperty(Window.LEGACY_NAME) res = getPropertyValue(ret, display=self.display) + if res: + return str(res[0]) + ret = self.getProperty(Window.LEGACY_NAME) + res = getPropertyValue(ret, display=self.display) if res: return str(res[0]) return None