]> git.proxmox.com Git - novnc-pve.git/blob - debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
bb1eac10c8bf706e53e2b852260414b4debf0128
[novnc-pve.git] / debian / patches / 0003-change-scaling-when-toggling-fullscreen.patch
1 From ce3216300e07c2723dc934c734dda432355a3100 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 03/10] 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 d960a12..662352f 100644
16 --- a/app/ui.js
17 +++ b/app/ui.js
18 @@ -1212,6 +1212,13 @@ 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') !== 'scale') {
26 + UI.forceSetting('resize', 'off');
27 + UI.enableSetting('resize');
28 + }
29 } else {
30 if (document.documentElement.requestFullscreen) {
31 document.documentElement.requestFullscreen();
32 @@ -1222,7 +1229,11 @@ const UI = {
33 } else if (document.body.msRequestFullscreen) {
34 document.body.msRequestFullscreen();
35 }
36 + // we want scaling in fullscreen mode
37 + UI.forceSetting('resize', 'scale');
38 + UI.enableSetting('resize');
39 }
40 + UI.applyResizeMode();
41 UI.enableDisableViewClip();
42 UI.updateFullscreenButton();
43 },
44 --
45 2.11.0
46