mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 01:56:39 +02:00
Merge pull request #11671 from ElderOrb/case8553
8380 Mouse Disappears when switching between HMD and Desktop Mode while in Create
This commit is contained in:
commit
66e38af1b3
1 changed files with 8 additions and 2 deletions
|
@ -234,7 +234,8 @@ void CompositorHelper::handleLeaveEvent() {
|
|||
|
||||
bool CompositorHelper::handleRealMouseMoveEvent(bool sendFakeEvent) {
|
||||
// If the mouse move came from a capture mouse related move, we completely ignore it.
|
||||
if (_ignoreMouseMove) {
|
||||
// Note: if not going to synthesize event - do not touch _ignoreMouseMove flag
|
||||
if (_ignoreMouseMove && sendFakeEvent) {
|
||||
_ignoreMouseMove = false;
|
||||
return true; // swallow the event
|
||||
}
|
||||
|
@ -246,7 +247,12 @@ bool CompositorHelper::handleRealMouseMoveEvent(bool sendFakeEvent) {
|
|||
auto changeInRealMouse = newPosition - _lastKnownRealMouse;
|
||||
auto newReticlePosition = _reticlePositionInHMD + toGlm(changeInRealMouse);
|
||||
setReticlePosition(newReticlePosition, sendFakeEvent);
|
||||
_ignoreMouseMove = true;
|
||||
|
||||
// Note: if not going to synthesize event - do not touch _ignoreMouseMove flag
|
||||
if (sendFakeEvent) {
|
||||
_ignoreMouseMove = true;
|
||||
}
|
||||
|
||||
QCursor::setPos(QPoint(_lastKnownRealMouse.x(), _lastKnownRealMouse.y())); // move cursor back to where it was
|
||||
return true; // swallow the event
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue