From be43532f1637b315466289154b387f48db7a9a0b Mon Sep 17 00:00:00 2001 From: Adrian Stoffels Date: Thu, 21 Dec 2023 21:06:15 +1030 Subject: [PATCH] More consistent positioning of fullscreen windows --- html5/js/Client.js | 2 +- html5/js/Window.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/html5/js/Client.js b/html5/js/Client.js index 4f7f07f1..424e36b6 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -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) { diff --git a/html5/js/Window.js b/html5/js/Window.js index b0f8fc31..84d9b928 100644 --- a/html5/js/Window.js +++ b/html5/js/Window.js @@ -124,6 +124,8 @@ 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; @@ -131,12 +133,12 @@ class XpraWindow { 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; }