-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken hit testing on extended title bar when maximized #8805
Comments
Shoutout to Fitt's Law |
Isn't this issue related to WinAppSdk rather than WinUI? |
Arguably yes, this issue is in The March 2024 WinUI Community Call indicated a better title bar experience is in the roadmap for Windows App SDK 1.6, so hopefully this is fixed on that timeframe. |
Thanks for the quick response, I hope so! |
A fix has been checked in. Using #8665 as the main tracking bug. |
Describe the bug
In Windows App SDK 1.4+, it is not possible to interact with the edges of the title bar for an AppWindow or WinUI 3 Window with ExtendsContentIntoTitleBar set to true when the window is maximized. This means that users are not able to click on the close/restore/minimize buttons if the cursor is in the topmost or rightmost position on screen. This also breaks restoring a window by dragging it from the very top or farthest sides of the title bar.
Instead of showing the correct cursor and performing the correct action, the cursor on the edges of the title bar becomes a resize cursor, although no resizing occurs.
Steps to reproduce the bug
ExtendsContentIntoTitleBar = true
Expected behavior
The title bar should behave (perform hit testing) like the default Windows title bar. Users should be able to interact with window controls on the far edges and corners of the screen when windows are maximized.
Screenshots
This is the cursor showing in the top right corner:
![NESW drag cursor](https://private-user-images.githubusercontent.com/18747724/264462073-37747285-491b-41a0-99ac-9dc48c271618.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3NzI5NjcsIm5iZiI6MTcyNTc3MjY2NywicGF0aCI6Ii8xODc0NzcyNC8yNjQ0NjIwNzMtMzc3NDcyODUtNDkxYi00MWEwLTk5YWMtOWRjNDhjMjcxNjE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA4VDA1MTc0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5ZmI2NTFjNTI1NzJiYmI2ZWNkZDI3ZTlhYTcwMGFiZjU1ZGUwYmE0YTUwNDYwODkxOGRiMWQ2YzdhNjVlYWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.rpJmirH8fMhi9nLM6lJikFAY2H65ODygi_ljJBAMF08)
It should be a normal arrow cursor, and the button should be red when hovered (and close the window when clicked):
![Arrow cursor](https://private-user-images.githubusercontent.com/18747724/264462181-19414805-251c-410b-acf1-ec99079599d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3NzI5NjcsIm5iZiI6MTcyNTc3MjY2NywicGF0aCI6Ii8xODc0NzcyNC8yNjQ0NjIxODEtMTk0MTQ4MDUtMjUxYy00MTBiLWFjZjEtZWM5OTA3OTU5OWQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA4VDA1MTc0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlYWYzZmE2NGU5YzAwYjA5MzUxMGU0NzVkNDI2ZDAxY2Q1ODUxMTMwNTliNDYwODk2YTk5OTNmYWI5M2Y5ZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gF0oP3jA5ycT394KukHG8hj_Q4Hm8iyZq39tdD6pghc)
NuGet package version
Microsoft.WindowsAppSDK 1.4.230822000
Microsoft.WindowsAppSDK 1.5.240311000
Windows version
Windows 11 (22H2): Build 22621
The text was updated successfully, but these errors were encountered: