artifacting fix, open new displays in new window

This commit is contained in:
matt 2023-12-21 13:58:27 +00:00
parent e6d93a9714
commit 19b3de10e1
3 changed files with 9 additions and 5 deletions

View File

@ -25,8 +25,8 @@ window.updateSetting = (name, value) => {
}
}
import "core-js/stable";
import "regenerator-runtime/runtime";
//import "core-js/stable";
//import "regenerator-runtime/runtime";
import * as Log from '../core/util/logging.js';
import _, { l10n } from './localization.js';
import { isTouchDevice, isSafari, hasScrollbarGutter, dragThreshold, supportsBinaryClipboard, isFirefox, isWindows, isIOS, supportsPointerLock }
@ -1890,7 +1890,7 @@ const UI = {
let new_display_url = `${window.location.protocol}//${window.location.host}${new_display_path}screen.html`;
Log.Debug(`Opening a secondary display ${new_display_url}`)
window.open(new_display_url);
window.open(new_display_url, '_blank', 'toolbar=0,location=0,menubar=0');
},
initMonitors(screenPlan) {

View File

@ -1694,6 +1694,8 @@ export default class RFB extends EventTargetMixin {
console.log('reattach message')
console.log(event.data)
this._display.addScreen(event.data.screenID, event.data.width, event.data.height, event.data.pixelRatio, event.data.containerHeight, event.data.containerWidth);
this._sendEncodings();
this._updateContinuousUpdates();
this.dispatchEvent(new CustomEvent("screenregistered", {}));
Log.Info(`Secondary monitor (${event.data.screenID}) has been reattached.`);
break;
@ -2868,6 +2870,8 @@ export default class RFB extends EventTargetMixin {
// Disable copyrect when using multiple displays
if (this._display.screens.length === 1) {
encs.push(encodings.encodingCopyRect);
} else {
Log.Debug("Multiple displays detected, disabling copyrect encoding.");
}
// Only supported with full depth support
if (this._fbDepth == 24) {

View File

@ -50,7 +50,7 @@
<script src="vendor/interact.min.js"></script>
<!-- Stylesheets -->
<!--link rel="stylesheet" href="app/styles/base.css">
<link rel="stylesheet" href="app/styles/base.css">
<script src="app/error-handler.js"></script>
@ -63,7 +63,7 @@
}
</script>
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>
</head>
<body>