Martí Bravo

Results 7 comments of Martí Bravo

I recommend you use the new Windowing APIs (`Microsoft.UI.Windowing`) to do all of these things. To extend client area to the titlebar, use `AppWindow.Titlebar.ExtendsContentIntoTitlebar`, and `AppWindow.Titlebar.Button...` properties to set the...

The AppWindow object for the current Window can be obtained by using WindowNative and Win32Interop APIs. Sample in C# below: ``` var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this); WindowId myWndId = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(hWnd); AppWindow...

Although I think AppWindow should be easier to obtain. The Window class should have a GetAppWindow method of some sort.

I would like to point out that SetTitlebar is kind of buggy and setting the "Drag" rectangles is better. Calculate them on launch and update them when resizing. It works...

> @martibravo Can you share how this can be accomplished? I'm familiar with the drag rectangles API, but setting a drag rectangle seems to break something and now only a...

[WslLogs-2025-05-20_15-46-55.zip](https://github.com/user-attachments/files/20348831/WslLogs-2025-05-20_15-46-55.zip)

> Is [this](https://github.com/ubuntu/wsl-setup/blob/6f0f09dc69e6306b6547a3e4cea8276b7672188d/wsl-setup#L112) the line you uncommented? > > If so, it may be ideal to open the issue on Ubuntu's [wsl-setup](https://github.com/ubuntu/wsl-setup) project, Indeed it was that line. Will do.