Fix for warning: Error CA1806 BringProcessToForeground calls SendInput but does not use the HRESULT or error code that the method returns. This could lead to unexpected behavior in error conditions or low-resource situations. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\MainWindow.xaml.cs 73 Active

This commit is contained in:
ryanbodrug-microsoft 2020-06-23 17:47:17 -07:00
parent 1f74dcff14
commit fad3142a47

View File

@ -70,7 +70,7 @@ namespace PowerLauncher
WindowsInteropHelper.INPUT[] inputs = new WindowsInteropHelper.INPUT[] { input };
// Send empty mouse event. This makes this thread the last to send input, and hence allows it to pass foreground permission checks
WindowsInteropHelper.SendInput(1, inputs, WindowsInteropHelper.INPUT.Size);
_ = WindowsInteropHelper.SendInput(1, inputs, WindowsInteropHelper.INPUT.Size);
Activate();
}