Skip to content

Commit

Permalink
More consistent positioning of fullscreen windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Stoffels committed Dec 21, 2023
1 parent 52742e3 commit be43532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3325,7 +3325,7 @@ class XpraClient {
}
let client_properties = {};
if (packet.length >= 8) client_properties = packet[7];
if (x == 0 && y == 0 && !metadata["set-initial-position"]) {
if (x == 0 && y == 0 && !metadata["set-initial-position"] && !metadata["fullscreen"]) {
//find a good position for it
const l = Object.keys(this.id_to_window).length;
if (l == 0) {
Expand Down
6 changes: 4 additions & 2 deletions html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,21 @@ class XpraWindow {
jQuery(this.div).addClass(`window-${this.windowtype}`);
}

const fullscreen = (metadata["fullscreen"]) ?? false;

if (this.client.server_is_desktop || this.client.server_is_shadow) {
jQuery(this.div).addClass("desktop");
this.resizable = false;
} else if (this.tray) {
jQuery(this.div).addClass("tray");
} else if (this.override_redirect) {
jQuery(this.div).addClass("override-redirect");
} else if (
} else if (!fullscreen && (
this.windowtype == "" ||
this.windowtype == "NORMAL" ||
this.windowtype == "DIALOG" ||
this.windowtype == "UTILITY"
) {
)) {
this.resizable = true;
}

Expand Down

0 comments on commit be43532

Please sign in to comment.