microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
InputNonClientPointerSource send error message to app window
Describe the bug
When the application meets the following conditions (application window maximization, custom title bar part (ExtendsContentToTitlebar = true), set the drag area of the application window), click the right mouse button of the InputNonClientPointerSource window, and send 0X0313 message to the application window at the same time after triggering the WM_NCRBUTTONDOWN message. 当应用满足以下几个条件(应用窗口最大化,自定义标题栏部分(ExtendsContentToTitlebar = true),设置了应用窗口的拖动区域)时,点击InputNonClientPointerSource窗口的鼠标右键,在触发WM_NCRBUTTONDOWN消息后,并同时给应用窗口发送0X0313消息。
0X0313 message is an unlogged message that is sent to the app window when the app right-clicks the taskbar widget. When the app window adds a window procedure, the message can be captured normally. 0X0313消息是一个未记录的消息,当应用点击任务栏小窗口的右键时,此消息会发送到应用窗口。当应用窗口添加了窗口过程,就可以正常捕捉到该消息。
参考链接:https://blog.csdn.net/davidhsing/article/details/7770909 Reference link:https://blog.csdn.net/davidhsing/article/details/7770909
Steps to reproduce the bug
1.Customize the app title bar 2.Sets the drag area of the app window 3.The app window is maximized 4.Click to drag the right mouse button of the window
Expected behavior
When several of the conditions described above are met, you should not send 0X0313 message to the app window. When this message is handled by default by the app window, the window menu is displayed at the location of the mouse, which should not be displayed under normal circumstances. 满足以上所述的几个条件时,不应该对应用窗口发送0X0313消息。该消息被应用窗口默认处理时,会在鼠标所处的位置处显示窗口菜单,正常情况下该窗口不应该显示。
Screenshots
NuGet package version
Windows App SDK 1.4.1: 1.4.230913002
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
None