[pve-devel] [PATCH pve_flutter_frontend] workaround for novnc fullscreen behaviour

Dominik Csapak d.csapak at proxmox.com
Mon Dec 20 12:37:57 CET 2021


since the webview seemingly does not allow javascripts 'requestFullscreen',
workaround that by making the whole webview fullscreen and hiding novncs
fullscreen button

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 lib/widgets/pve_console_menu_widget.dart | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/widgets/pve_console_menu_widget.dart b/lib/widgets/pve_console_menu_widget.dart
index 2cd2bc9..17573d6 100644
--- a/lib/widgets/pve_console_menu_widget.dart
+++ b/lib/widgets/pve_console_menu_widget.dart
@@ -180,13 +180,11 @@ class PveConsoleMenu extends StatelessWidget {
 
   Route _createHTMLConsoleRoute() {
     return PageRouteBuilder(
-      pageBuilder: (context, animation, secondaryAnimation) => Card(
-        child: PVEWebConsole(
-          apiClient: apiClient,
-          node: node,
-          guestID: guestID,
-          type: type,
-        ),
+      pageBuilder: (context, animation, secondaryAnimation) => PVEWebConsole(
+        apiClient: apiClient,
+        node: node,
+        guestID: guestID,
+        type: type,
       ),
     );
   }
@@ -219,7 +217,7 @@ class PVEWebConsoleState extends State<PVEWebConsole> {
     final ticket = widget.apiClient.credentials.ticket!;
     final baseUrl = widget.apiClient.credentials.apiBaseUrl;
 
-    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&resize=scale";
+    var consoleUrl = "${baseUrl}/?novnc=1&node=${widget.node}&isFullscreen=true&resize=scale";
     if (widget.guestID != null) {
       final consoleType = widget.type == 'lxc' ? 'lxc' : 'kvm';
       consoleUrl += "&console=${consoleType}&vmid=${widget.guestID}";
-- 
2.30.2






More information about the pve-devel mailing list