Allow our messages from non-elevated processes

This commit is contained in:
2025-07-01 12:38:22 -04:00
parent 5849525029
commit 72ddd0ad88
3 changed files with 26 additions and 2 deletions

View File

@@ -77,6 +77,14 @@ internal partial class MainWindow
WindowSettings.Apply();
}
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
var windowHandle = new WindowInteropHelper(this).Handle;
WindowManager.AllowMessagesThroughFilter(windowHandle);
}
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == WindowManager.SetLockMessage)