fixed comment into code

This commit is contained in:
2026-08-09 20:02:23 +05:00
parent 778fc1034b
commit 7e4e569d53
34 changed files with 332 additions and 306 deletions
+9 -9
View File
@@ -3,14 +3,14 @@ using System.Runtime.InteropServices;
namespace CursorLang.Interop;
/// <summary>
/// Win32 API для размещения окна настроек: его собственные границы и рабочая
/// область монитора, на который окно просят поставить.
/// Win32 API for placing the settings window: its own bounds and the work area
/// of the monitor the window is asked to be put on.
/// </summary>
/// <remarks>
/// Границы берутся у системы, а не из <c>Window.Left/Top/Width/Height</c>:
/// высота окна подстраивается под содержимое, и WPF пересчитывает эти свойства
/// по DPI монитора, а рабочая область монитора приходит в пикселях. Считать
/// центр в одних единицах проще, чем переводить туда-обратно.
/// The bounds are taken from the system rather than from <c>Window.Left/Top/Width/Height</c>:
/// the window height adapts to its content, and WPF converts those properties using the
/// monitor DPI, while the monitor work area comes in pixels. Computing the centre in a
/// single unit is simpler than converting back and forth.
/// </remarks>
internal static class WindowPlacementNative
{
@@ -34,13 +34,13 @@ internal static class WindowPlacementNative
private const uint MONITOR_DEFAULTTONEAREST = 2;
/// <summary>Границы окна в пикселях экрана — вместе с рамкой и заголовком.</summary>
/// <summary>The window bounds in screen pixels — including the frame and the title bar.</summary>
internal static PopupWindowNative.Rect? TryGetBounds(IntPtr hWnd) =>
GetWindowRect(hWnd, out PopupWindowNative.Rect bounds) ? bounds : null;
/// <summary>
/// Рабочая область — без панели задач — того монитора, на котором
/// прямоугольник находится целиком или хотя бы большей частью.
/// The work area — without the taskbar — of the monitor that holds the
/// rectangle entirely, or at least most of it.
/// </summary>
internal static PopupWindowNative.Rect? TryGetWorkAreaNear(PopupWindowNative.Rect rect)
{