mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Don't bother with foreground window on unix
This commit is contained in:
@@ -74,12 +74,14 @@ namespace Velopack
|
||||
|
||||
var p = Process.Start(psi);
|
||||
|
||||
if (p is not null) {
|
||||
try {
|
||||
// this is an attempt to work around a bug where the restarted app fails to come to foreground.
|
||||
AllowSetForegroundWindow(p.Id);
|
||||
} catch (Exception ex) {
|
||||
logger.LogWarning(ex, "Failed to allow Update.exe to set foreground window.");
|
||||
if (VelopackRuntimeInfo.IsWindows) {
|
||||
if (p is not null) {
|
||||
try {
|
||||
// this is an attempt to work around a bug where the restarted app fails to come to foreground.
|
||||
AllowSetForegroundWindow(p.Id);
|
||||
} catch (Exception ex) {
|
||||
logger.LogWarning(ex, "Failed to allow Update.exe to set foreground window.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user