mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02: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:
@@ -70,7 +70,7 @@ namespace PowerLauncher
|
|||||||
WindowsInteropHelper.INPUT[] inputs = new WindowsInteropHelper.INPUT[] { input };
|
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
|
// 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();
|
Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user