]> git.proxmox.com Git - novnc-pve.git/blob - debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
rebase novnc patches on 1.0.0
[novnc-pve.git] / debian / patches / 0003-change-scaling-when-toggling-fullscreen.patch
1 From 6abc6b0b278717584ff2452cbe8d1f448398a406 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 | 9 +++++++++
12 1 file changed, 9 insertions(+)
13
14 diff --git a/app/ui.js b/app/ui.js
15 index b01fd5d..d35be49 100644
16 --- a/app/ui.js
17 +++ b/app/ui.js
18 @@ -1210,6 +1210,12 @@ var 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 + }
28 } else {
29 if (document.documentElement.requestFullscreen) {
30 document.documentElement.requestFullscreen();
31 @@ -1220,7 +1226,10 @@ var UI = {
32 } else if (document.body.msRequestFullscreen) {
33 document.body.msRequestFullscreen();
34 }
35 + // we want scaling in fullscreen mode
36 + UI.updateSetting('resize', 'scale');
37 }
38 + UI.applyResizeMode();
39 UI.enableDisableViewClip();
40 UI.updateFullscreenButton();
41 },
42 --
43 2.11.0
44