linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.44k stars 569 forks source link

Add support for showing native system menu on windows #2362

Closed YouKnow-sys closed 10 months ago

YouKnow-sys commented 1 year ago

This PR will add support to show native windows system menu when user right click on titlebar (when handle_titlebar is true, or in other word in windows with custom titlebar) in windows platform. The system menu that will be showed is the default system menu of the program. (all states of it will be updated based on current state of program) additionally because we didn't remove the WS_SYSMENU flag in window without titlebar, we still can see the window control buttons when program freezes or don't work (just like chrome for example), this can be used to interact with program (like closing/minimizing) even when the GUI itself doesn't work. image