Handle unavailable registry in on_focus_changed.
This commit is contained in:
parent
431257d380
commit
eeb875d098
@ -97,7 +97,12 @@ def on_focus_changed():
|
||||
delta = datetime.datetime.now() - msg.time
|
||||
log.misc.debug("Handling queued {} for window {}, delta {}".format(
|
||||
msg.method_name, msg.win_id, delta))
|
||||
bridge = _get_bridge(msg.win_id)
|
||||
try:
|
||||
bridge = _get_bridge(msg.win_id)
|
||||
except objreg.RegistryUnavailableError:
|
||||
# Non-mainwindow window focused.
|
||||
_QUEUED.append(msg)
|
||||
return
|
||||
if delta.total_seconds() < 1:
|
||||
text = msg.text
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user