Skip to content

Commit

Permalink
set last session on session button event. not login
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Sep 17, 2024
1 parent b41ccb5 commit d7a7dcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/module/gtkwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def login_handler(self):
gsettings_set("last-hash",new_last_hash.strip())
if get("username-cache", True, "gtkwindow"):
gsettings_set("last-username", lightdm.get_username())
gsettings_set("last-session", lightdm.get_session())

busdir = "/var/lib/lightdm/"
if os.path.exists("/{}/pardus-greeter".format(busdir)):
Expand Down
2 changes: 1 addition & 1 deletion src/module/sessionlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, session):
def set_default(self, status=False):
if status:
self.image.set_from_icon_name("emblem-default-symbolic", 0)
gsettings_set("last-session", self.session)
else:
self.image.set_from_icon_name("", 0)

Expand Down Expand Up @@ -67,7 +68,6 @@ def button_event(widget):
last_session = gsettings_get("last-session")
if last_session == "" or last_session not in sessions:
last_session = sessions[0]
gsettings_set("last-session", last_session)
lightdm.set(session=last_session)
session_buttons[last_session].set_default(True)

Expand Down

0 comments on commit d7a7dcf

Please sign in to comment.