Skip to content

Conversation

@maxpietsch
Copy link
Member

@maxpietsch maxpietsch commented Apr 21, 2021

Deactivating the pan gesture to avoid spurious start and finish and sticky pan (remains in GestureUpdated state) reproducible by rendering things with latency, for instance via increased ODF render detail in ortho view mode:

Prior to this change with Qt 5.15.2:

QGestureEvent((QPanGesture(state=GestureStarted,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureFinished,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureStarted,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureFinished,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureStarted,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureFinished,lastOffset=0,0QPointF(0,0),offset=0,0,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureStarted,hotSpot=961,577,lastOffset=0,0QPointF(0,0),offset=-150,-143,acceleration=1,delta=-150,-143)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-150,-143QPointF(-150,-143),offset=-243,-210,acceleration=1,delta=-93,-67)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-210QPointF(-243,-210),offset=-243,-210,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-210QPointF(-243,-210),offset=-243,-210,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-210QPointF(-243,-210),offset=-243,-210,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-210QPointF(-243,-210),offset=-246,-209,acceleration=1,delta=-3,1)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-246,-209QPointF(-246,-209),offset=-246,-209,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-246,-209QPointF(-246,-209),offset=-244,-91,acceleration=1,delta=2,118)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-244,-91QPointF(-244,-91),offset=-243,-81,acceleration=1,delta=1,10)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-81QPointF(-243,-81),offset=-243,-82,acceleration=1,delta=0,-1)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureUpdated,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
QGestureEvent((QPanGesture(state=GestureFinished,hotSpot=961,577,lastOffset=-243,-82QPointF(-243,-82),offset=-243,-82,acceleration=1,delta=0,0)))
...

fixes #761
related: 5687708

@maxpietsch maxpietsch added this to the 3.0.3 hotfix milestone Apr 21, 2021
@jdtournier
Copy link
Member

OK, so removing the pan gesture fixes the problem? I'm not sure what I'm looking at with all this output...

@maxpietsch
Copy link
Member Author

maxpietsch commented Apr 21, 2021

Yes, not "grabbing" pan gestures solves the issue.

The output above is Qt debug output I added when mrview is started in debug mode. It shows the type and state of the gesture whenever the GUI parses a gesture. I did not voluntarily use pan gestures. When the sticky pan happens, PanGestures with GestureUpdated state are reported repeatedly even without touching the touchpad (delta=0,0).

BTW, explicitly unregistering QTapAndHoldGesture did not solve the issue. Unregistering the pan gesture or not grabbing it did solve it.

@jdtournier
Copy link
Member

OK, good to hear. I guess there's still quite a bit of cleaning up to be done before we can merge this...?

@maxpietsch
Copy link
Member Author

I was thinking of leaving the Qt debug output there in debug mode but happy to remove it.

@jdtournier
Copy link
Member

jdtournier commented Apr 21, 2021

No issues with leaving the debug output in debug mode if you feel like it.

I was looking more at the pan gesture handler - these lines. Is that still required?

@maxpietsch maxpietsch merged commit a548835 into master May 5, 2021
@maxpietsch maxpietsch deleted the mrview_sticky_pan branch May 5, 2021 07:22
@Lestropie Lestropie modified the milestones: 3.0.4 hotfix, 3.0.3 hotfix May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sticky move in mrview

4 participants