Changeset 94060 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 2, 2022 3:33:28 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
r93990 r94060 312 312 && pHandle != pWatched) 313 313 { 314 /* Create new mouse event with translated mouse positions. */315 QMouseEvent newME(pMouseEvent->type(),316 pHandle->mapFromGlobal(pMouseEvent->globalPos()),317 pMouseEvent->button(),318 pMouseEvent->buttons(),319 pMouseEvent->modifiers());320 314 /* Check if we hit the handle */ 321 315 bool fMarginHit = QRect(pHandle->mapToGlobal(QPoint(0, 0)), pHandle->size()).adjusted(-margin, 0, margin, 0).contains(pMouseEvent->globalPos()); … … 328 322 m_fHandleGrabbed = true; 329 323 UICursor::setCursor(this, Qt::SplitHCursor); 330 qApp->postEvent(pHandle, new QMouseEvent(newME)); 324 qApp->postEvent(pHandle, new QMouseEvent(pMouseEvent->type(), 325 pHandle->mapFromGlobal(pMouseEvent->globalPos()), 326 pMouseEvent->button(), 327 pMouseEvent->buttons(), 328 pMouseEvent->modifiers())); 331 329 return true; 332 330 } … … 340 338 { 341 339 UICursor::setCursor(this, Qt::SplitHCursor); 342 qApp->postEvent(pHandle, new QMouseEvent(newME)); 340 qApp->postEvent(pHandle, new QMouseEvent(pMouseEvent->type(), 341 pHandle->mapFromGlobal(pMouseEvent->globalPos()), 342 pMouseEvent->button(), 343 pMouseEvent->buttons(), 344 pMouseEvent->modifiers())); 343 345 return true; 344 346 } 345 else 346 { 347 /* If not, reset the state. */ 348 m_fHandleGrabbed = false; 349 UICursor::setCursor(this, Qt::ArrowCursor); 350 } 347 348 /* If not, reset the state. */ 349 m_fHandleGrabbed = false; 350 UICursor::setCursor(this, Qt::ArrowCursor); 351 351 } 352 352 }
Note:
See TracChangeset
for help on using the changeset viewer.