Updated BaseWindow::nativeEvent

References:
- https://doc.qt.io/qt-5/qwidget.html#nativeEvent
- https://doc.qt.io/qt-6/qwidget.html#nativeEvent
This commit is contained in:
zneix 2021-07-30 17:40:25 +02:00
parent 1330076d5d
commit 023149a023
No known key found for this signature in database
GPG key ID: 911916E0523B22F6
2 changed files with 6 additions and 6 deletions

View file

@ -638,7 +638,7 @@ void BaseWindow::moveIntoDesktopRect(QWidget *parent, QPoint point)
} }
bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message,
long *result) qintptr *result)
{ {
#ifdef USEWINSDK #ifdef USEWINSDK
# if (QT_VERSION == QT_VERSION_CHECK(5, 11, 1)) # if (QT_VERSION == QT_VERSION_CHECK(5, 11, 1))
@ -823,7 +823,7 @@ bool BaseWindow::handleSHOWWINDOW(MSG *msg)
#endif #endif
} }
bool BaseWindow::handleNCCALCSIZE(MSG *msg, long *result) bool BaseWindow::handleNCCALCSIZE(MSG *msg, qintptr *result)
{ {
#ifdef USEWINSDK #ifdef USEWINSDK
if (this->hasCustomWindowFrame()) if (this->hasCustomWindowFrame())
@ -909,7 +909,7 @@ bool BaseWindow::handleMOVE(MSG *msg)
return false; return false;
} }
bool BaseWindow::handleNCHITTEST(MSG *msg, long *result) bool BaseWindow::handleNCHITTEST(MSG *msg, qintptr *result)
{ {
#ifdef USEWINSDK #ifdef USEWINSDK
const LONG border_width = 8; // in pixels const LONG border_width = 8; // in pixels

View file

@ -65,7 +65,7 @@ public:
protected: protected:
virtual bool nativeEvent(const QByteArray &eventType, void *message, virtual bool nativeEvent(const QByteArray &eventType, void *message,
long *result) override; qintptr *result) override;
virtual void scaleChangedEvent(float) override; virtual void scaleChangedEvent(float) override;
virtual void paintEvent(QPaintEvent *) override; virtual void paintEvent(QPaintEvent *) override;
@ -100,10 +100,10 @@ private:
bool handleDPICHANGED(MSG *msg); bool handleDPICHANGED(MSG *msg);
bool handleSHOWWINDOW(MSG *msg); bool handleSHOWWINDOW(MSG *msg);
bool handleNCCALCSIZE(MSG *msg, long *result); bool handleNCCALCSIZE(MSG *msg, qintptr *result);
bool handleSIZE(MSG *msg); bool handleSIZE(MSG *msg);
bool handleMOVE(MSG *msg); bool handleMOVE(MSG *msg);
bool handleNCHITTEST(MSG *msg, long *result); bool handleNCHITTEST(MSG *msg, qintptr *result);
bool enableCustomFrame_; bool enableCustomFrame_;
ActionOnFocusLoss actionOnFocusLoss_ = Nothing; ActionOnFocusLoss actionOnFocusLoss_ = Nothing;