Bug 234713 - mouse scroll works incorrect
Summary: mouse scroll works incorrect
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-18 16:11 UTC by yar
Modified: 2010-07-29 00:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE 4.5


Attachments
Correction suggestion (833 bytes, patch)
2010-07-13 02:34 UTC, Mathieu Lornac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yar 2010-04-18 16:11:25 UTC
Version:           0.10.2 (using KDE 4.4.2)
OS:                Linux
Installed from:    openSUSE RPMs

When I scroll document with mouse and move cursor over the edge of screen, okular sometimes jump over page. If I move mouse very slow, all is right.
Comment 1 Alexander 2010-07-09 15:03:44 UTC
I have this bug too, but it also appears when I move mouse slow. It makes scrolling this way inconvenient.  
I using KDE 4.4.5.
Here is video: http://dl.dropbox.com/u/7603377/test-0000.mpeg
Comment 2 Albert Astals Cid 2010-07-12 20:29:23 UTC
It always works fine to me. Do you have a way to reproduce the problem? Also which options in the view menu do you have set? What about the zoom level?
Comment 3 Alexander 2010-07-12 22:16:03 UTC
Thank you for answer.
For me bug is very reproducable. Is occurs on almost any view settings, on any pdf file and on any zoom level.

Bug NOT occurs in full screen mode.
Bug also not occurs when taskbar panel is in the bottom of a screen.
As you can see, my panel is in the left.

You should try to place bottom panel in any non-bottom side of a screen(when panel in top bug is occur).
Comment 4 Albert Astals Cid 2010-07-12 23:53:40 UTC
right, with the panel in the left is easier to reproduce
Comment 5 Mathieu Lornac 2010-07-13 02:34:26 UTC
Created attachment 49085 [details]
Correction suggestion

I removed this bug by limiting the amplitude of one move to half of the screen size.
Works well on my computer.

File modified: ui/pageview.cpp
Comment 6 Mathieu Lornac 2010-07-13 02:39:32 UTC
My commentary was incorrect. I considered single movements bigger than half of the screen size as incorrect so i recalculate the move to make when it occurs.
Comment 7 Albert Astals Cid 2010-07-20 23:37:41 UTC
Hi Mathieu, i sincerely doubt that fixes anything, have you checked that the code ever enters the ifs you have added (e.g. by adding some kDebugs)?
Comment 8 Mathieu Lornac 2010-07-21 00:02:50 UTC
Yes, if you print the delta variable (i did it with qDebug()) without the patch, you will see that when the display bug occurs the delta values are too big to be correct (almost the screen size).

I reproduced the bug with the panel on the left, it was easier that way.

If mouseGrabPos.X is close to 0 and mousePos is now the bottom of the screen (going through the up), on the next refresh you have delta with a wrong value (closed to screen size).

This is what i have changed with delta.setY(mouseContainer.height() - absDelta.y());

It fixes the bug for me, i can look for another way to fix it if you think this is not correct.
Mathieu
Comment 9 Albert Astals Cid 2010-07-29 00:30:46 UTC
SVN commit 1156334 by aacid:

Fix mouse scrolling when wrapping sometimes sending you where you did not want
Patch by Mathieu Lornac
BUGS: 234713


 M  +11 -1     pageview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156334