From 1235968419f60ee1f09eecbe43df6eda1f894298 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 10 Apr 2020 17:42:00 -0700 Subject: [PATCH] IsInputBlocked. --- ScreenCast.Win/Services/KeyboardMouseInputWin.cs | 10 ++++++++++ Utilities/Publish.ps1 | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ScreenCast.Win/Services/KeyboardMouseInputWin.cs b/ScreenCast.Win/Services/KeyboardMouseInputWin.cs index ab4b4f86..6fc70371 100644 --- a/ScreenCast.Win/Services/KeyboardMouseInputWin.cs +++ b/ScreenCast.Win/Services/KeyboardMouseInputWin.cs @@ -348,11 +348,21 @@ namespace Remotely.ScreenCast.Win.Services { if (!Win32Interop.SwitchToInputDesktop()) { + if (IsInputBlocked) + { + BlockInput(false); + } + Task.Run(() => { Win32Interop.SwitchToInputDesktop(); inputAction(); }).Wait(); + + if (IsInputBlocked) + { + BlockInput(true); + } } else { diff --git a/Utilities/Publish.ps1 b/Utilities/Publish.ps1 index eef2660d..d8f1763c 100644 --- a/Utilities/Publish.ps1 +++ b/Utilities/Publish.ps1 @@ -5,7 +5,7 @@ Publishes the Remotely clients. To deploy the server, supply the following arguments: -rid win10-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com .COPYRIGHT - Copyright 2019 Translucency Software. All rights reserved. + Copyright 2020 Translucency Software. All rights reserved. .EXAMPLE Run it from the Utilities folder (located in the solution directory). Or run "powershell -f Publish.ps1 -rid win10-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com @@ -29,7 +29,9 @@ $Day = ([DateTime]::UtcNow).Day.ToString().PadLeft(2, "0") $Hour = ([DateTime]::UtcNow).Hour.ToString().PadLeft(2, "0") $Minute = ([DateTime]::UtcNow).Minute.ToString().PadLeft(2, "0") $CurrentVersion = "$Year.$Month.$Day.$Hour$Minute" -$MSBuildPath = (Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\" -Recurse -Filter "MSBuild.exe" -File)[0].FullName +$MSBuildPath = (Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\" -Recurse -Filter "MSBuild.exe" -File | ForEach-Object { + [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_.FullName) +} | Sort-Object -Property FileVersion -Descending | Select-Object -First 1).FileName $Root = (Get-Item -Path $PSScriptRoot).Parent.FullName $SignAssemblies = $false