Guard against the event.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
f38b86e992
commit
ae92a00628
|
@ -187,6 +187,7 @@ bool Widget::nativeEvent(const QByteArray &eventType, void *message, long *resul
|
||||||
Q_ASSERT(eventType == "windows_generic_MSG");
|
Q_ASSERT(eventType == "windows_generic_MSG");
|
||||||
Q_ASSERT(message);
|
Q_ASSERT(message);
|
||||||
Q_ASSERT(result);
|
Q_ASSERT(result);
|
||||||
|
if (ui->customizeTitleBarCB->isChecked()) {
|
||||||
const auto msg = static_cast<LPMSG>(message);
|
const auto msg = static_cast<LPMSG>(message);
|
||||||
const auto getCursorPosition = [](const LPARAM lParam) -> QPoint {
|
const auto getCursorPosition = [](const LPARAM lParam) -> QPoint {
|
||||||
return {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
|
return {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
|
||||||
|
@ -207,5 +208,6 @@ bool Widget::nativeEvent(const QByteArray &eventType, void *message, long *resul
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return QWidget::nativeEvent(eventType, message, result);
|
return QWidget::nativeEvent(eventType, message, result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue