Skip to content

Commit bdf506b

Browse files
committed
LINUX: Improved Wayland support for some apps which (surprisingly) work using X11/XOrg.
1 parent 9296e96 commit bdf506b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dist/PyWinCtl-0.3-py3-none-any.whl

-5 Bytes
Binary file not shown.

src/pywinctl/_pywinctl_linux.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def getActiveWindow() -> Optional[LinuxWindow]:
7676
# swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true).pid' -> Not working (socket issue)
7777
# pynput / mouse --> Not working (no global events allowed, only application events)
7878
_, activeWindow = _WgetAllWindows()
79-
if activeWindow and activeWindow.get("id", None):
79+
if activeWindow and activeWindow.get("id", False):
8080
win_id = str(activeWindow["id"])
8181
if not win_id:
8282
win_id = defaultEwmhRoot.getActiveWindow()
@@ -115,7 +115,7 @@ def getAllWindows():
115115
"""
116116
if os.environ['XDG_SESSION_TYPE'].lower() == "wayland":
117117
windowsList, _ = _WgetAllWindows()
118-
windows = [str(win["id"]) for win in windowsList if win and win.get("id", None)]
118+
windows = [str(win["id"]) for win in windowsList if win and win.get("id", False)]
119119
else:
120120
windows = defaultEwmhRoot.getClientListStacking()
121121
return [window for window in __remove_bad_windows(windows)]

0 commit comments

Comments
 (0)