Fuck sake :)
Following happens when mouse is wrapped:
1) QCursor::setPos(new_pos)
2) mouseGrabPos = new_pos
So absDelta will be ok. I'll mark corresponding lines, look:

                     if ( mousePos.y() <= mouseContainer.top() + 4
                         && verticalScrollBar()->value() <
verticalScrollBar()->maximum() - 10 )
                     {
                         mousePos.setY( mouseContainer.bottom() - 5 ); //!!!!!
                         QCursor::setPos( mousePos );
                     }
                     // wrap mouse from bottom to top
                     else if ( mousePos.y() >= mouseContainer.bottom() - 4
                                && verticalScrollBar()->value() > 10 )
                     {
                         mousePos.setY( mouseContainer.top() + 5 ); //!!!!!!
                         QCursor::setPos( mousePos );
                     }
                     // remember last position
                     d->mouseGrabPos = mousePos; //!!!!!!!!!!!!!!!!!!!!!!!

At last line it remembers new mouse pos. So next delta will be good delta...
_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to