Skip to content

Commit

Permalink
#356 also honour 'setting-change' message
Browse files Browse the repository at this point in the history
and go back to using the default value when the session name is empty
  • Loading branch information
totaam committed Jan 21, 2025
1 parent e1100bb commit 908989a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,10 @@ class XpraClient {
$("#startmenuentry").show();
}
}
else if (setting == "session_name") {
this.session_name = value;
jQuery("title").text(value);
}
}

xdg_image(icon_data, icon_type) {
Expand Down
7 changes: 4 additions & 3 deletions html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,13 @@ class XpraWindow {
jQuery(this.div).addClass("windowinfocus");

// Update window title
if (this.client.session_name === undefined) {
if (this.client.session_name) {
jQuery("title").text(client.session_name);
}
else {
jQuery("title").text(
`${location.pathname.replaceAll("/", "")}: ${this.title}`
);
} else {
jQuery("title").text(client.session_name);
}

// Update the icon
Expand Down

0 comments on commit 908989a

Please sign in to comment.