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); |             var p = Process.Start(psi); | ||||||
| 
 | 
 | ||||||
|             if (p is not null) { |             if (VelopackRuntimeInfo.IsWindows) { | ||||||
|                 try { |                 if (p is not null) { | ||||||
|                     // this is an attempt to work around a bug where the restarted app fails to come to foreground. |                     try { | ||||||
|                     AllowSetForegroundWindow(p.Id); |                         // this is an attempt to work around a bug where the restarted app fails to come to foreground. | ||||||
|                 } catch (Exception ex) { |                         AllowSetForegroundWindow(p.Id); | ||||||
|                     logger.LogWarning(ex, "Failed to allow Update.exe to set foreground window."); |                     } catch (Exception ex) { | ||||||
|  |                         logger.LogWarning(ex, "Failed to allow Update.exe to set foreground window."); | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user