@@ -257,7 +257,6 @@ void QtHaikuWindow::Zoom(BPoint origin, float w, float h)
257
257
Q_UNUSED (origin);
258
258
Q_UNUSED (w);
259
259
Q_UNUSED (h);
260
- fView ->PreventMouse ();
261
260
Q_EMIT windowZoomed ();
262
261
}
263
262
@@ -269,14 +268,12 @@ void QtHaikuWindow::Minimize(bool minimized)
269
268
270
269
void QtHaikuWindow::FrameResized (float width, float height)
271
270
{
272
- fView ->PreventMouse ();
273
271
Q_EMIT windowResized (QSize (static_cast <int >(width), static_cast <int >(height)));
274
272
}
275
273
276
274
277
275
void QtHaikuWindow::FrameMoved (BPoint point)
278
276
{
279
- fView ->PreventMouse ();
280
277
Q_EMIT windowMoved (QPoint (point.x , point.y ));
281
278
}
282
279
@@ -1019,12 +1016,25 @@ void QHaikuWindow::platformMouseEvent(const QPoint &localPosition,
1019
1016
globalPosition, state, button, type, modifiers, source);
1020
1017
QWindowSystemInterface::handleExposeEvent (window (), QRect (QPoint (0 ,0 ), window ()->size ()));
1021
1018
} else {
1022
- if (type == QEvent::MouseButtonRelease && m_systemMoveResizeEnabled) {
1023
- m_systemMoveResizeEnabled = false ;
1019
+ QWindowSystemInterface::handleMouseEvent (window (),
1020
+ localPosition, globalPosition, state, button, type, modifiers, source);
1021
+ if (window ()->cursor ().shape () == Qt::BitmapCursor || window ()->cursor ().shape () == Qt::CustomCursor) {
1022
+ QPoint hotSpot = window ()->cursor ().hotSpot ();
1023
+ QPoint pos = window ()->mapFromGlobal (m_lastMousePos);
1024
+ QRect rect = window ()->cursor ().bitmap ()->rect ().translated (pos.x () - hotSpot.x (), pos.y () - hotSpot.y ());
1025
+ QWindowSystemInterface::handleExposeEvent (window (), QRegion (rect.adjusted (-1 , -1 , 1 , 1 )));
1026
+
1027
+ pos = window ()->mapFromGlobal (window ()->cursor ().pos ());
1028
+ rect = window ()->cursor ().bitmap ()->rect ().translated (pos.x () - hotSpot.x (), pos.y () - hotSpot.y ());
1029
+ QWindowSystemInterface::handleExposeEvent (window (), QRegion (rect.adjusted (-1 , -1 , 1 , 1 )));
1024
1030
}
1031
+ if (type == QEvent::MouseButtonRelease && m_systemMoveResizeEnabled)
1032
+ m_systemMoveResizeEnabled = false ;
1033
+
1025
1034
if (type == QEvent::MouseMove && m_systemMoveResizeEnabled) {
1026
1035
if (m_systemResizeEdges == 0 ) {
1027
1036
window ()->setFramePosition (m_systemMoveWindowGeometry.topLeft () + (globalPosition - m_lastMousePos));
1037
+ QWindowSystemInterface::handleGeometryChange (window (), m_systemMoveWindowGeometry);
1028
1038
return ;
1029
1039
}
1030
1040
QRect newGeometry = m_systemMoveWindowGeometry;
@@ -1040,18 +1050,6 @@ void QHaikuWindow::platformMouseEvent(const QPoint &localPosition,
1040
1050
QWindowSystemInterface::handleGeometryChange (window (), newGeometry);
1041
1051
return ;
1042
1052
}
1043
- QWindowSystemInterface::handleMouseEvent (window (),
1044
- localPosition, globalPosition, state, button, type, modifiers, source);
1045
- if (window ()->cursor ().shape () == Qt::BitmapCursor || window ()->cursor ().shape () == Qt::CustomCursor) {
1046
- QPoint hotSpot = window ()->cursor ().hotSpot ();
1047
- QPoint pos = window ()->mapFromGlobal (m_lastMousePos);
1048
- QRect rect = window ()->cursor ().bitmap ()->rect ().translated (pos.x () - hotSpot.x (), pos.y () - hotSpot.y ());
1049
- QWindowSystemInterface::handleExposeEvent (window (), QRegion (rect.adjusted (-1 , -1 , 1 , 1 )));
1050
-
1051
- pos = window ()->mapFromGlobal (window ()->cursor ().pos ());
1052
- rect = window ()->cursor ().bitmap ()->rect ().translated (pos.x () - hotSpot.x (), pos.y () - hotSpot.y ());
1053
- QWindowSystemInterface::handleExposeEvent (window (), QRegion (rect.adjusted (-1 , -1 , 1 , 1 )));
1054
- }
1055
1053
}
1056
1054
m_lastMousePos = globalPosition;
1057
1055
}
0 commit comments