i3-companion: simplify check for intruding windows

Sticky window is usually floating, as well as the non-normal windows.
So, no need for all these checks.
This commit is contained in:
Vincent Bernat 2021-07-18 00:37:10 +02:00
parent f95d1e2b92
commit b32462031b

View file

@ -340,12 +340,7 @@ async def workspace_exclusive(i3, event):
w = event.container
# Can the current window intrude the workspace?
if (
w.floating in {"auto_on", "user_on"}
or w.ipc_data["window_type"] not in {"normal", "splash", "unknown"}
or w.sticky
or w.window_class in intrusive_apps
):
if w.floating in {"auto_on", "user_on"} or w.window_class in intrusive_apps:
logger.debug("window %s can intrude", w.window_class)
return