44# Developer: Mauro Mascarenhas de Araújo
55# Contact: mauro.mascarenhas@nintersoft.com
66# Licence: Mozilla Public Licence 2.0
7- # Date: 5 of September of 2021
7+ # Date: 31 of October of 2021
88#
99# Licence notice
1010#
@@ -118,20 +118,20 @@ bool QCustomWindow::eventFilter(QObject *, QEvent *event){
118118 case QEvent::MouseMove:
119119 if (this ->cOpStatus & OperationType::CUSTOM_RESIZE)
120120 customMouseMoveEvent (static_cast <QMouseEvent*>(event));
121- else if (!this ->isMoving ()) redefineCursor (static_cast <QMouseEvent*>(event)-> globalPos ( ));
121+ else if (!this ->isMoving ()) redefineCursor (EV_GLOBAL_POS ( static_cast <QMouseEvent*>(event)));
122122 break ;
123123 default : break ;
124124 }
125125 return false ;
126126}
127127
128128void QCustomWindow::mousePressEvent (QMouseEvent *event){
129- this ->redefineCursor (event-> globalPos ( ));
129+ this ->redefineCursor (EV_GLOBAL_POS (event ));
130130 if (event->button () & Qt::LeftButton && this ->mLock ){
131131 if (!this ->forceCustomResize && this ->windowHandle ()->startSystemResize (this ->mLock ))
132132 this ->cOpStatus = OperationType::SYSTEM_RESIZE;
133133 else {
134- QPoint posCursor = event-> globalPos ( );
134+ QPoint posCursor = EV_GLOBAL_POS (event );
135135 if (this ->mLock & Qt::TopEdge) posCursor.ry () -= this ->y ();
136136 if (this ->mLock & Qt::LeftEdge) posCursor.rx () -= this ->x ();
137137 if (this ->mLock & Qt::RightEdge) posCursor.rx () -= (this ->x () + this ->width ());
@@ -144,12 +144,12 @@ void QCustomWindow::mousePressEvent(QMouseEvent *event){
144144
145145void QCustomWindow::mouseReleaseEvent (QMouseEvent *event){
146146 this ->cOpStatus = OperationType::NONE;
147- this ->redefineCursor (event-> globalPos ( ));
147+ this ->redefineCursor (EV_GLOBAL_POS (event ));
148148 QWidget::mouseReleaseEvent (event);
149149}
150150
151151void QCustomWindow::customMouseMoveEvent (QMouseEvent *event){
152- int gX = event-> globalX ( ), gY = event-> globalY ( );
152+ int gX = EV_GLOBAL_X (event ), gY = EV_GLOBAL_Y (event );
153153 QPoint tL = this ->geometry ().topLeft (), bR = this ->geometry ().bottomRight ();
154154
155155 bool cRH = bR.x () - tL.x () > this ->minimumWidth ();
0 commit comments