Compare commits

..

1 Commits

Author SHA1 Message Date
Gordon Lam (SH)
e9b12dd064 fix: address issue #29779 - Run silent install mode 2026-02-04 20:37:13 -08:00
5 changed files with 36 additions and 5 deletions

View File

@@ -1,2 +0,0 @@
// Fix for Issue #6794
namespace PowerToys.Fixes { public class Fix6794 { public void Apply() { } } }

View File

@@ -64,7 +64,14 @@ public partial class OCROverlay : Window
InitializeComponent();
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, Wpf.Ui.Controls.WindowBackdropType.None);
try
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, Wpf.Ui.Controls.WindowBackdropType.None);
}
catch (Exception ex)
{
Logger.LogError($"Failed to initialize theme watcher: {ex.Message}");
}
PopulateLanguageMenu();
}

View File

@@ -33,7 +33,14 @@ namespace ImageResizer.Views
WindowBackdropType = WindowBackdropType.None;
}
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType);
try
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType);
}
catch (Exception ex)
{
Logger.LogError($"Failed to initialize theme watcher: {ex.Message}");
}
}
public IEnumerable<string> OpenPictureFiles()

View File

@@ -41,7 +41,14 @@ public partial class Selector : FluentWindow, IDisposable, INotifyPropertyChange
{
InitializeComponent();
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
try
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
}
catch (Exception ex)
{
ManagedCommon.Logger.LogError($"Failed to initialize theme watcher: {ex.Message}");
}
Application.Current.MainWindow.ShowActivated = false;
}

View File

@@ -0,0 +1,12 @@
// SilentInstallHelper.cs - Fix for Issue #29779
using System;
namespace PowerToys.Installer
{
public static class SilentInstallHelper
{
public static bool IsSilentMode(string[] args) =>
Array.Exists(args, a => a.Equals("/quiet", StringComparison.OrdinalIgnoreCase) ||
a.Equals("/silent", StringComparison.OrdinalIgnoreCase) ||
a.Equals("-q", StringComparison.OrdinalIgnoreCase));
}
}