mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
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:
parent
1f74dcff14
commit
fad3142a47
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user