Work around a missing state-changed:focused event in LibreOffice