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
|
delta = datetime.datetime.now() - msg.time
|
||||||
log.misc.debug("Handling queued {} for window {}, delta {}".format(
|
log.misc.debug("Handling queued {} for window {}, delta {}".format(
|
||||||
msg.method_name, msg.win_id, delta))
|
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:
|
if delta.total_seconds() < 1:
|
||||||
text = msg.text
|
text = msg.text
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user