Sorry about that. I don't have any experience with big OSS projects
collaborative development (except kde-l10n, where we don't need to
care about revisions, diffs, ...).

Yes, it happens when panel is at top (following is logged after I
commented out delta fix): http://paste.kde.org/3932/
IMHO better solution: use QCursor::pos() to recalculate real delta if
we enter into one of that blocks related to absDelta. This must also
solve false triggering if it when mouse is rapidly moved.
Something like that:

                    QPoint mousePos = e->globalPos();
                    QPoint delta = d->mouseGrabPos - mousePos;

                    // wrap mouse from top to bottom
                    const QRect mouseContainer =
KGlobalSettings::desktopGeometry( this );
                    // If the delta is huge it probably means we just
wrapped in that direction
                    const QPoint absDelta(abs(delta.x()), abs(delta.y()));
                    if ( absDelta.y() > mouseContainer.height() / 2 ) {
                        delta.setY(d->mouseGrabPos.y() - QCursor::pos.y());
                    }
                    if ( absDelta.x() > mouseContainer.width() / 2 ) {
                       delta.setX(d->mouseGrabPos.x() - QCursor::pos.x());
                    }

What do you think?
_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to