| | |
| | | using Moli.Desktop.Configuration; |
| | | using Moli.Desktop.Diagnostics; |
| | | using Moli.Desktop.Layout; |
| | | |
| | | namespace Moli.Desktop.Interop; |
| | | |
| | |
| | | |
| | | public bool IsSupported() => true; |
| | | |
| | | public bool TryAttachWallpaperWindow(IntPtr hwnd, MonitorInfo monitor, out string? error) |
| | | public bool TryAttachDesktopWindow(IntPtr hwnd, RectD bounds, out string? error) |
| | | { |
| | | error = null; |
| | | if (!NativeMethods.SetWindowPos( |
| | | hwnd, |
| | | NativeMethods.HwndBottom, |
| | | (int)monitor.Bounds.X, |
| | | (int)monitor.Bounds.Y, |
| | | (int)monitor.Bounds.Width, |
| | | (int)monitor.Bounds.Height, |
| | | (int)bounds.X, |
| | | (int)bounds.Y, |
| | | (int)bounds.Width, |
| | | (int)bounds.Height, |
| | | NativeMethods.SwpNoActivate | NativeMethods.SwpShowWindow)) |
| | | { |
| | | error = $"SetWindowPos failed with {NativeMethods.GetLastError()}"; |