Revert "优化代码"

This reverts commit 92bb458345.
This commit is contained in:
2025-09-30 19:15:03 +08:00
parent d9e3524211
commit a9b0ac0595
16 changed files with 131 additions and 71 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ namespace Ink_Canvas.Helpers
return Screen.PrimaryScreen;
// 获取窗口的句柄
if (!(PresentationSource.FromVisual(window) is HwndSource hwndSource))
var hwndSource = PresentationSource.FromVisual(window) as HwndSource;
if (hwndSource == null)
return Screen.PrimaryScreen;
// 获取窗口在屏幕上的位置