修复无边框alt键还原窗体最大化BUG

master
feiyangqingyun 2022-02-23 10:09:50 +08:00
parent ef2b8db532
commit 1ae38e2b1f
3 changed files with 12 additions and 0 deletions

View File

@ -273,6 +273,10 @@ bool FramelessDialog::nativeEvent(const QByteArray &eventType, void *message, lo
if (msg->message == WM_NCCALCSIZE) { if (msg->message == WM_NCCALCSIZE) {
*result = 0; *result = 0;
return true; return true;
} else if (msg->message == WM_SYSKEYDOWN) {
//屏蔽alt键按下
} else if (msg->message == WM_SYSKEYUP) {
//屏蔽alt键松开
} else if (msg->message == WM_NCHITTEST) { } else if (msg->message == WM_NCHITTEST) {
//计算鼠标对应的屏幕坐标 //计算鼠标对应的屏幕坐标
//这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题 //这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题

View File

@ -273,6 +273,10 @@ bool FramelessMainWindow::nativeEvent(const QByteArray &eventType, void *message
if (msg->message == WM_NCCALCSIZE) { if (msg->message == WM_NCCALCSIZE) {
*result = 0; *result = 0;
return true; return true;
} else if (msg->message == WM_SYSKEYDOWN) {
//屏蔽alt键按下
} else if (msg->message == WM_SYSKEYUP) {
//屏蔽alt键松开
} else if (msg->message == WM_NCHITTEST) { } else if (msg->message == WM_NCHITTEST) {
//计算鼠标对应的屏幕坐标 //计算鼠标对应的屏幕坐标
//这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题 //这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题

View File

@ -273,6 +273,10 @@ bool FramelessWidget::nativeEvent(const QByteArray &eventType, void *message, lo
if (msg->message == WM_NCCALCSIZE) { if (msg->message == WM_NCCALCSIZE) {
*result = 0; *result = 0;
return true; return true;
} else if (msg->message == WM_SYSKEYDOWN) {
//屏蔽alt键按下
} else if (msg->message == WM_SYSKEYUP) {
//屏蔽alt键松开
} else if (msg->message == WM_NCHITTEST) { } else if (msg->message == WM_NCHITTEST) {
//计算鼠标对应的屏幕坐标 //计算鼠标对应的屏幕坐标
//这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题 //这里最开始用的 LOWORD HIWORD 在多屏幕的时候会有问题