Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/passwordEntry.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def on_draw(self, widget, cr, data=None):
height = icon_rect.height - 4

handled = False
if self.lockscreen_layout_source is None:
return False
if settings.get_show_flags():
ui_scale = self.get_scale_factor()

Expand Down Expand Up @@ -203,6 +205,8 @@ def update_layout_icon(self):
also ensures a redraw at the correct time to update the flag image.
"""
self.set_icon_from_icon_name(Gtk.EntryIconPosition.PRIMARY, "screensaver-blank")
if self.lockscreen_layout_source is None:
return
self.set_icon_tooltip_text(Gtk.EntryIconPosition.PRIMARY, self.lockscreen_layout_source.display_name)

def on_destroy(self, widget, data=None):
Expand Down Expand Up @@ -239,6 +243,8 @@ def restore_original_layout(self):
Called when the unlock dialog is destroyed, restores
the group that was active before the screensaver was activated.
"""
if self.lockscreen_layout_source is None or self.system_layout_source is None:
return
if settings.get_kb_group() != self.lockscreen_layout_source.index:
settings.set_kb_group(self.lockscreen_layout_source.index)

Expand Down