]> git.proxmox.com Git - novnc-pve.git/blob - debian/patches/0002-change-scaling-when-toggling-fullscreen.patch
5bf888b45252cb59c026cece0ec3fbe99f6aa0cd
[novnc-pve.git] / debian / patches / 0002-change-scaling-when-toggling-fullscreen.patch
1 From c1073cb0f19ebd64f6ee4b221b5aa06a2f8e5c99 Mon Sep 17 00:00:00 2001
2 From: Dominik Csapak <d.csapak@proxmox.com>
3 Date: Thu, 11 May 2017 10:34:10 +0200
4 Subject: [PATCH 2/9] change scaling when toggling fullscreen
5
6 when activating fullscreen, we change the scaling to 'scale',
7 and changing it back when leaving fullscreen
8
9 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
10 ---
11 app/ui.js | 11 +++++++++++
12 1 file changed, 11 insertions(+)
13
14 diff --git a/app/ui.js b/app/ui.js
15 index def0eda..d4b0291 100644
16 --- a/app/ui.js
17 +++ b/app/ui.js
18 @@ -1174,6 +1174,15 @@ const UI = {
19 } else if (document.msExitFullscreen) {
20 document.msExitFullscreen();
21 }
22 +
23 + // when changing from fullscreen to window,
24 + // re enable auto resize
25 + if (WebUtil.getQueryVar('resize') === null) {
26 + UI.updateSetting('resize', null);
27 + setTimeout(function() {
28 + UI.fixScrollbars();
29 + }, 100);
30 + }
31 } else {
32 if (document.documentElement.requestFullscreen) {
33 document.documentElement.requestFullscreen();
34 @@ -1184,6 +1193,8 @@ const UI = {
35 } else if (document.body.msRequestFullscreen) {
36 document.body.msRequestFullscreen();
37 }
38 + // we want scaling in fullscreen mode
39 + UI.updateSetting('resize', 'scale');
40 }
41 UI.enableDisableViewClip();
42 UI.updateFullscreenButton();
43 --
44 2.11.0
45