From 954428d6c83ee6c83ca86769efb15c312be3402d Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Wed, 11 Oct 2023 08:31:08 +0000 Subject: [PATCH] Fix spacing and fractional units --- app/ui.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/app/ui.js b/app/ui.js index 85c5af5a..712f63e9 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1690,6 +1690,14 @@ const UI = { UI.toggleIMEMode(); } break; + case 'open_displays_mode': + if (UI.rfb) { + UI.openDisplays() + } + break; + case 'close_displays_mode': + UI.closeDisplays() + break; case 'enable_webrtc': if (!UI.getSetting('enable_webrtc')) { UI.forceSetting('enable_webrtc', true, false); @@ -2044,8 +2052,8 @@ const UI = { for (var i = 0; i < monitors.length; i++) { monitors[i].isDragging = false; } - const screenplan = setScreenPlan() UI.recenter() + const screenplan = setScreenPlan() UI.draw() } function myMove(e) { @@ -2097,15 +2105,15 @@ const UI = { var a = monitors[i]; screens.push({ screenID: a.id, - serverHeight: a.h * scale, - serverWidth: a.w * scale, - x: (a.x - left) * scale, - y: (a.y - top) * scale + serverHeight: Math.floor(a.h * scale), + serverWidth: Math.floor(a.w * scale), + x: Math.floor((a.x - left) * scale), + y: Math.floor((a.y - top) * scale) }) } const screenPlan = { - serverHeight: height * scale, - serverWidth: width * scale, + serverHeight: Math.floor(height * scale), + serverWidth: Math.floor(width * scale), screens } UI.rfb.applyScreenPlan(screenPlan);