Merge pull request #244 from xenserver/xs64bit

Xs64bit
This commit is contained in:
Gabor Apati-Nagy 2014-10-09 16:19:23 +01:00
commit be0fb37df7
3 changed files with 9 additions and 4 deletions

View File

@ -86,6 +86,7 @@ namespace XenAdmin.ConsoleView
private Timer connectionPoller = null;
private VM sourceVM = null;
private bool sourceIsPV = false;
private readonly Object hostedConsolesLock = new Object();
private List<XenRef<Console>> hostedConsoles = null;
@ -538,7 +539,7 @@ namespace XenAdmin.ConsoleView
if (RemoteConsole != null && RemoteConsole.ConsoleControl != null)
{
RemoteConsole.KeyHandler = this.KeyHandler;
RemoteConsole.SendScanCodes = hasRDP;
RemoteConsole.SendScanCodes = !this.sourceIsPV;
RemoteConsole.Scaling = Scaling;
RemoteConsole.DisplayBorder = this.displayFocusRectangle;
SetKeyboardAndMouseCapture(autoCaptureKeyboardAndMouse);
@ -654,6 +655,8 @@ namespace XenAdmin.ConsoleView
if (value != null)
{
value.PropertyChanged += new PropertyChangedEventHandler(VM_PropertyChanged);
sourceIsPV = !value.IsHVM;
startPolling();
@ -1009,7 +1012,7 @@ namespace XenAdmin.ConsoleView
}
else
{
v.SendScanCodes = UseSource && hasRDP;
v.SendScanCodes = UseSource && !this.sourceIsPV;
v.SourceVM = sourceVM;
v.Console = console;
v.connect(stream, this.vncPassword);

View File

@ -765,6 +765,8 @@ namespace XenAdmin
Alert.RemoveAlert(alert => alert.Connection != null && alert.Connection.Equals(connection));
Updates.CheckServerPatches();
Updates.CheckServerVersion();
RequestRefreshTreeView();
}
void connection_CachePopulated(object sender, EventArgs e)

View File

@ -233,12 +233,12 @@ namespace XenAPI
if (Helpers.MidnightRideOrGreater(connection))
{
if (connection.Session.IsLocalSuperuser)
if (connection.Session != null && connection.Session.IsLocalSuperuser)
return true;
foreach (Role role in validRoleList)
{
if (connection.Session.Roles.Contains(role))
if (connection.Session != null && connection.Session.Roles != null && connection.Session.Roles.Contains(role))
return true;
}
}