GDK W32: Implement show_window_menu()
This is achieved by sending undocumented message WM_SYSMENU to the window. Before doing that, the window is given WS_SYSMENU style (to enable window menu) and some combination of WS_MAXIMIZEBOX (for "Mazimize" item) WS_MINIMIZEBOX (for "Minimize" item) WS_SIZEBOX (for "Size" item) depending on which operations are currently permissible. WM_SYSMENU is processed by DefWindowProc(), which results in showing the window menu. We remove extra styles at the first opportunity (WM_INITMENU message), as they alter the way our window is rendered. https://bugzilla.gnome.org/show_bug.cgi?id=763851
This commit is contained in:
@ -97,6 +97,18 @@
|
||||
#define WM_MOUSEHWHEEL 0x20E
|
||||
#endif
|
||||
|
||||
/* According to
|
||||
* http://blog.airesoft.co.uk/2009/11/wm_messages/
|
||||
* this is the actual internal name MS uses for this undocumented message.
|
||||
* According to
|
||||
* https://bugs.winehq.org/show_bug.cgi?id=15055
|
||||
* wParam is 0
|
||||
* lParam is a pair of virtual desktop coordinates for the popup
|
||||
*/
|
||||
#ifndef WM_SYSMENU
|
||||
#define WM_SYSMENU 0x313
|
||||
#endif
|
||||
|
||||
#ifndef CF_DIBV5
|
||||
#define CF_DIBV5 17
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user