Don't modify mouse or keyboard in view_only mode
The UI previously didn't respect view_only in a number of cases.
This commit is contained in:
parent
301dc0e20b
commit
ceb847b0e3
13
app/ui.js
13
app/ui.js
|
@ -1096,10 +1096,13 @@ var UI;
|
|||
} else if (resizeMode === 'scale' || resizeMode === 'downscale') {
|
||||
var downscaleOnly = resizeMode === 'downscale';
|
||||
var scaleRatio = display.autoscale(screen.w, screen.h, downscaleOnly);
|
||||
|
||||
if (!UI.rfb.get_view_only()) {
|
||||
UI.rfb.get_mouse().set_scale(scaleRatio);
|
||||
Util.Debug('Scaling by ' + UI.rfb.get_mouse().get_scale());
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// The screen is always the same size as the available viewport
|
||||
|
@ -1513,7 +1516,7 @@ var UI;
|
|||
* ------v------*/
|
||||
|
||||
setMouseButton: function(num) {
|
||||
if (UI.rfb) {
|
||||
if (UI.rfb && !UI.rfb.get_view_only()) {
|
||||
UI.rfb.get_mouse().set_touchButton(num);
|
||||
}
|
||||
|
||||
|
@ -1529,17 +1532,17 @@ var UI;
|
|||
},
|
||||
|
||||
displayBlur: function() {
|
||||
if (!UI.rfb) return;
|
||||
|
||||
if (UI.rfb && !UI.rfb.get_view_only()) {
|
||||
UI.rfb.get_keyboard().set_focused(false);
|
||||
UI.rfb.get_mouse().set_focused(false);
|
||||
}
|
||||
},
|
||||
|
||||
displayFocus: function() {
|
||||
if (!UI.rfb) return;
|
||||
|
||||
if (UI.rfb && !UI.rfb.get_view_only()) {
|
||||
UI.rfb.get_keyboard().set_focused(true);
|
||||
UI.rfb.get_mouse().set_focused(true);
|
||||
}
|
||||
},
|
||||
|
||||
updateDesktopName: function(rfb, name) {
|
||||
|
|
Loading…
Reference in New Issue