Fix Linux remote control bug.

This commit is contained in:
Jared Goodwin 2019-12-12 14:04:43 -08:00
parent 702d5754fc
commit 403e78e134
3 changed files with 12 additions and 7 deletions

2
.gitignore vendored
View File

@ -272,3 +272,5 @@ __pycache__/
/Server/CurrentVersion.txt
/Server/wwwroot/scripts/**/*.js
/Server/wwwroot/scripts/**/*.map
/Server/Server.db-shm
/Server/Server.db-wal

View File

@ -68,13 +68,16 @@ namespace Remotely.ScreenCast.Core.Capture
{
try
{
var currentDesktopName = Win32Interop.GetCurrentDesktop();
if (desktopName.ToLower() != currentDesktopName.ToLower())
if (OSUtils.IsWindows)
{
desktopName = currentDesktopName;
Logger.Write($"Switching to desktop {desktopName} in ScreenCaster.");
Win32Interop.SwitchToInputDesktop();
continue;
var currentDesktopName = Win32Interop.GetCurrentDesktop();
if (desktopName.ToLower() != currentDesktopName.ToLower())
{
desktopName = currentDesktopName;
Logger.Write($"Switching to desktop {desktopName} in ScreenCaster.");
Win32Interop.SwitchToInputDesktop();
continue;
}
}
while (viewer.PendingFrames > 10)

View File

@ -180,7 +180,7 @@ namespace Remotely.Server.Services
private IEnumerable<KeyValuePair<string, Device>> GetActiveClientConnections(string[] deviceIDs)
{
return DeviceSocketHub.ServiceConnections.Where(x =>
x.Value.OrganizationID == RemotelyUser.Organization.ID &&
x.Value.OrganizationID == RemotelyUser.OrganizationID &&
deviceIDs.Contains(x.Value.ID)
);
}