i3-companion: handle windows disappearing too fast

This commit is contained in:
Vincent Bernat 2021-07-23 11:19:50 +02:00
parent 1f61b8b208
commit dcad9cfbd3

View file

@ -352,7 +352,11 @@ async def workspace_exclusive(i3, event):
# Get the window workspace. From an event, w.workspace() is None, # Get the window workspace. From an event, w.workspace() is None,
# so search it in the tree. # so search it in the tree.
current_workspace = tree.find_by_id(w.id).workspace().num current_window = tree.find_by_id(w.id)
if current_window is None:
logger.debug("cannot find new window in tree?")
return
current_workspace = current_window.workspace().num
# Get the list of workspaces with an exclusive app, excluding the # Get the list of workspaces with an exclusive app, excluding the
# current window and windows of the same class. # current window and windows of the same class.