Skip to content

polkitAgent: Only reset UI on session resets while opened

Since _destroySession() is not only called before we try to initiate a new authentication session with Polkit, but also when the dialog is closed, it's currently possible that key focus is grabbed by the close button after the dialog was dismissed and hidden. This is causing a bug where after dismissing one of multiple queued dialogs, key focus goes away and keyboard navigation with the new dialog is impossible.

Fix this by only resetting the UI of the dialog if the dialog is still opened/visible at that point.

Merge request reports